From d02dd1f9e2f00a1b5484b71d3c14d6571479f56b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D0=B5=D1=80=D0=B3=D0=B5=D0=B9=20=D0=90=D0=BD=D1=82?= =?UTF-8?q?=D1=80=D0=BE=D0=BF=D0=BE=D0=B2?= Date: Mon, 27 Oct 2025 10:48:43 +0300 Subject: [PATCH] =?UTF-8?q?=D0=92=D0=BE=D1=81=D1=81=D1=82=D0=B0=D0=BD?= =?UTF-8?q?=D0=BE=D0=B2=D0=BB=D0=B5=D0=BD=D1=8B=20=D0=BF=D1=80=D0=B5=D1=81?= =?UTF-8?q?=D0=B5=D1=82=D1=8B=20=D0=B4=D0=BB=D1=8F=20Kubernetes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- molecule/presets/k8s-istio-full.yml | 55 ++++++++++++++++++++ molecule/presets/k8s-multi.yml | 81 +++++++++++++++++++++++++++++ molecule/presets/k8s-single.yml | 46 ++++++++++++++++ 3 files changed, 182 insertions(+) create mode 100644 molecule/presets/k8s-istio-full.yml create mode 100644 molecule/presets/k8s-multi.yml create mode 100644 molecule/presets/k8s-single.yml diff --git a/molecule/presets/k8s-istio-full.yml b/molecule/presets/k8s-istio-full.yml new file mode 100644 index 0000000..f310a27 --- /dev/null +++ b/molecule/presets/k8s-istio-full.yml @@ -0,0 +1,55 @@ +--- +# ПРЕСЕТ: Kubernetes + Istio Full Stack (1 кластер с полным стеком) +# +# Описание: Полноценный Kubernetes кластер с полным стеком Istio +# - 1 Kind кластер с 3 workers +# - Полный Istio service mesh с Kiali +# - Prometheus + Grafana для мониторинга +# - Jaeger для трассировки +# - Все аддоны включены +# +# Использование: make lab-test SCENARIO=universal LAB_SPEC=molecule/presets/k8s-istio-full.yml +# +# Автор: Сергей Антропов +# Сайт: https://devops.org.ru + +docker_network: labnet + +kind_clusters: + - name: istio-full + workers: 3 + api_port: 6443 + addons: + ingress_nginx: true + metrics_server: true + istio: true + kiali: true + prometheus_stack: true + ingress_host_http_port: 8081 + ingress_host_https_port: 8443 + +images: + debian: "ghcr.io/ansible-community/molecule-ubuntu-systemd:jammy" + rhel: "quay.io/centos/centos:stream9-systemd" + +systemd_defaults: + privileged: true + command: "/sbin/init" + volumes: + - "/sys/fs/cgroup:/sys/fs/cgroup:ro" + tmpfs: + - "/run" + - "/run/lock" + capabilities: + - "SYS_ADMIN" + +hosts: + - name: k8s-controller + group: controllers + family: debian + publish: + - "6443:6443" + - "9090:9090" # Prometheus + - "3000:3000" # Grafana + - "16686:16686" # Jaeger + - "20001:20001" # Kiali diff --git a/molecule/presets/k8s-multi.yml b/molecule/presets/k8s-multi.yml new file mode 100644 index 0000000..5a3d098 --- /dev/null +++ b/molecule/presets/k8s-multi.yml @@ -0,0 +1,81 @@ +--- +# ПРЕСЕТ: Kubernetes Multi-Cluster (3 кластера) +# +# Описание: Несколько Kind кластеров для тестирования мульти-кластерных сценариев +# - 3 Kind кластера: dev, staging, prod +# - Различные конфигурации для каждого окружения +# - Полный стек мониторинга и service mesh +# +# Использование: make lab-test SCENARIO=universal LAB_SPEC=molecule/presets/k8s-multi.yml +# +# Автор: Сергей Антропов +# Сайт: https://devops.org.ru + +docker_network: labnet + +kind_clusters: + - name: dev + workers: 1 + api_port: 6443 + addons: + ingress_nginx: true + metrics_server: true + ingress_host_http_port: 8081 + ingress_host_https_port: 8443 + + - name: staging + workers: 2 + api_port: 6444 + addons: + ingress_nginx: true + metrics_server: true + istio: true + kiali: true + ingress_host_http_port: 8082 + ingress_host_https_port: 8444 + + - name: prod + workers: 3 + api_port: 6445 + addons: + ingress_nginx: true + metrics_server: true + istio: true + kiali: true + prometheus_stack: true + ingress_host_http_port: 8083 + ingress_host_https_port: 8445 + +images: + debian: "ghcr.io/ansible-community/molecule-ubuntu-systemd:jammy" + rhel: "quay.io/centos/centos:stream9-systemd" + +systemd_defaults: + privileged: true + command: "/sbin/init" + volumes: + - "/sys/fs/cgroup:/sys/fs/cgroup:ro" + tmpfs: + - "/run" + - "/run/lock" + capabilities: + - "SYS_ADMIN" + +hosts: + - name: k8s-dev-controller + group: controllers + family: debian + publish: + - "6443:6443" + + - name: k8s-staging-controller + group: controllers + family: rhel + publish: + - "6444:6444" + + - name: k8s-prod-controller + group: controllers + family: debian + publish: + - "6445:6445" diff --git a/molecule/presets/k8s-single.yml b/molecule/presets/k8s-single.yml new file mode 100644 index 0000000..68f921c --- /dev/null +++ b/molecule/presets/k8s-single.yml @@ -0,0 +1,46 @@ +--- +# ПРЕСЕТ: Kubernetes Single Node (1 кластер) +# +# Описание: Одиночный Kind кластер для простого тестирования K8s ролей +# - 1 Kind кластер с 1 worker +# - Базовые аддоны: Ingress NGINX, Metrics Server +# - Простая конфигурация для быстрого старта +# +# Использование: make lab-test SCENARIO=universal LAB_SPEC=molecule/presets/k8s-single.yml +# +# Автор: Сергей Антропов +# Сайт: https://devops.org.ru + +docker_network: labnet + +kind_clusters: + - name: single + workers: 1 + api_port: 6443 + addons: + ingress_nginx: true + metrics_server: true + ingress_host_http_port: 8081 + ingress_host_https_port: 8443 + +images: + debian: "ghcr.io/ansible-community/molecule-ubuntu-systemd:jammy" + rhel: "quay.io/centos/centos:stream9-systemd" + +systemd_defaults: + privileged: true + command: "/sbin/init" + volumes: + - "/sys/fs/cgroup:/sys/fs/cgroup:ro" + tmpfs: + - "/run" + - "/run/lock" + capabilities: + - "SYS_ADMIN" + +hosts: + - name: k8s-controller + group: controllers + family: debian + publish: + - "6443:6443"