iac/clusters/aero/infrastructure.yaml

42 lines
1.5 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Инфраструктура разделена на два слоя, и это не косметика.
#
# Flux делает dry-run всей Kustomization целиком перед применением. Если
# положить cert-manager (который СТАВИТ CRD) и ClusterIssuer/Certificate
# (которые ЭТИ CRD используют) в один слой, dry-run падает с
# no matches for kind "Certificate" in version "cert-manager.io/v1"
# и не применяется НИЧЕГО — включая сам cert-manager. Дедлок: CRD никогда не
# появятся, потому что слой не может пройти проверку.
#
# Поэтому: controllers ставят чарты (и CRD), configs применяются после них
# через dependsOn и содержат только пользовательские ресурсы.
---
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: infra-controllers
namespace: flux-system
spec:
interval: 10m0s
path: ./clusters/aero/controllers
prune: true
wait: true
timeout: 10m0s
sourceRef:
kind: GitRepository
name: flux-system
---
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: infra-configs
namespace: flux-system
spec:
interval: 10m0s
path: ./clusters/aero/configs
prune: true
dependsOn:
- name: infra-controllers
sourceRef:
kind: GitRepository
name: flux-system