docs: sync addon docs with explicit external/internal service modes

Обновлена документация под новые аддоны (gitlab, redis, mongodb, kafka, kafka-ui, rabbitmq) и новую модель явного выбора зависимостей. Добавлены и унифицированы описания переключателей *_database_mode и *_redis_mode, обновлена таблица зависимостей аддонов, примеры конфигурации и список vault-секретов.
This commit is contained in:
Sergey Antropoff
2026-04-29 23:21:04 +03:00
parent dde2fc8a8a
commit 38aaadbfb1
128 changed files with 2881 additions and 902 deletions

28
addons/redis/README.md Normal file
View File

@@ -0,0 +1,28 @@
# redis
Аддон устанавливает Redis в Kubernetes в режимах `standalone` или `replication` с PVC.
```yaml
addon_redis: true
redis_architecture: "standalone" # standalone | replication
redis_storage_size: "8Gi"
```
Для кластера (replication):
```yaml
redis_architecture: "replication"
redis_replica_count: 2
```
Установка:
```bash
make addon-redis
```
## Официальные ресурсы
- Официальный сайт: [https://redis.io/](https://redis.io/)
- Официальная документация: [https://redis.io/docs/latest/](https://redis.io/docs/latest/)
- Версии Helm chart / ПО: [https://artifacthub.io/packages/helm/bitnami/redis](https://artifacthub.io/packages/helm/bitnami/redis)

View File

@@ -0,0 +1,7 @@
---
- name: Install Redis
hosts: k3s_master[0]
gather_facts: false
become: true
roles:
- role: "{{ playbook_dir }}/role"

View File

@@ -0,0 +1,26 @@
---
# Версия чарта Redis
redis_version: "19.6.4"
# Namespace
redis_namespace: "redis"
# Репозиторий Bitnami
redis_chart_repo: "https://charts.bitnami.com/bitnami"
# Архитектура: standalone | replication
redis_architecture: "standalone"
# Включить пароль (AUTH)
redis_auth_enabled: true
# Пароль Redis
redis_auth_password: "{{ vault_redis_password | default('changeme-redis') }}"
# StorageClass
redis_storage_class: ""
# Размер PVC
redis_storage_size: "8Gi"
# Реплики Redis (используется для replication)
redis_replica_count: 2
# Включить метрики
redis_metrics_enabled: true

View File

@@ -0,0 +1,11 @@
---
- name: Converge redis defaults
hosts: all
gather_facts: false
tasks:
- ansible.builtin.copy:
dest: /tmp/redis-facts.yaml
mode: "0644"
content: |
redis_architecture: "standalone"
redis_replica_count: "2"

View File

@@ -0,0 +1,14 @@
---
driver:
name: docker
platforms:
- name: master01
image: geerlingguy/docker-ubuntu2204-ansible:latest
pre_build_image: true
provisioner:
name: ansible
playbooks:
converge: converge.yml
verify: verify.yml
verifier:
name: ansible

View File

@@ -0,0 +1,13 @@
---
- name: Verify redis defaults
hosts: all
gather_facts: false
tasks:
- ansible.builtin.slurp:
src: /tmp/redis-facts.yaml
register: facts_raw
- ansible.builtin.set_fact:
v: "{{ facts_raw.content | b64decode | from_yaml }}"
- ansible.builtin.assert:
that:
- v.redis_architecture == "standalone"

View File

@@ -0,0 +1,39 @@
---
- name: Add Bitnami Helm repo
kubernetes.core.helm_repository:
name: bitnami
repo_url: "{{ redis_chart_repo }}"
environment:
KUBECONFIG: "{{ k3s_kubeconfig_path }}"
- name: Deploy Redis via Helm
kubernetes.core.helm:
name: redis
chart_ref: bitnami/redis
chart_version: "{{ redis_version }}"
release_namespace: "{{ redis_namespace }}"
create_namespace: true
wait: true
timeout: "10m0s"
values:
architecture: "{{ redis_architecture }}"
auth:
enabled: "{{ redis_auth_enabled | bool }}"
password: "{{ redis_auth_password }}"
master:
persistence:
enabled: true
size: "{{ redis_storage_size }}"
storageClass: "{{ redis_storage_class }}"
replica:
replicaCount: "{{ redis_replica_count if redis_architecture == 'replication' else 0 }}"
persistence:
enabled: "{{ redis_architecture == 'replication' }}"
size: "{{ redis_storage_size }}"
storageClass: "{{ redis_storage_class }}"
metrics:
enabled: "{{ redis_metrics_enabled | bool }}"
serviceMonitor:
enabled: "{{ redis_metrics_enabled | bool and addon_prometheus_stack | default(false) | bool }}"
environment:
KUBECONFIG: "{{ k3s_kubeconfig_path }}"