From 2f33a4bdb35c4bb0280cd6f08b5c5df19f84374d Mon Sep 17 00:00:00 2001 From: emelinda Date: Wed, 15 Jul 2026 12:09:49 +0300 Subject: [PATCH] refactor(d8-ugmk-prod): move istio-config to per-cluster overlay Relocated `istio-config` from `clusters/d8-ugmk-prod/infrastructure` into `infrastructure/istio-config/d8-ugmk-prod` overlay. Updated kustomization files to reference the new overlay structure. Removed unused patches and flattened resource definitions. --- .../infrastructure/kustomization.yaml | 111 ------------------ clusters/d8-ugmk-prod/kustomization.yaml | 11 +- .../d8-ugmk-prod}/istio-config.yaml | 0 .../d8-ugmk-prod/kustomization.yaml | 6 + 4 files changed, 16 insertions(+), 112 deletions(-) delete mode 100644 clusters/d8-ugmk-prod/infrastructure/kustomization.yaml rename {clusters/d8-ugmk-prod/infrastructure/patches => infrastructure/istio-config/d8-ugmk-prod}/istio-config.yaml (100%) create mode 100644 infrastructure/istio-config/d8-ugmk-prod/kustomization.yaml diff --git a/clusters/d8-ugmk-prod/infrastructure/kustomization.yaml b/clusters/d8-ugmk-prod/infrastructure/kustomization.yaml deleted file mode 100644 index 8dfa458..0000000 --- a/clusters/d8-ugmk-prod/infrastructure/kustomization.yaml +++ /dev/null @@ -1,111 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -resources: - - ../../../infrastructure/kafka - - ../../../infrastructure/rabbitmq - - ../../../infrastructure/camunda - - ../../../infrastructure/vault - - ../../../infrastructure/postgresql - - ../../../infrastructure/zitadel - - ../../../infrastructure/istio-config -patches: - - path: ./patches/kafka.yaml - target: - group: helm.toolkit.fluxcd.io - version: v2 - kind: HelmRelease - name: kafka - namespace: kafka - - path: ./patches/kafka-namespace.yaml - target: - version: v1 - kind: Namespace - name: kafka - - path: ./patches/rabbitmq.yaml - target: - group: helm.toolkit.fluxcd.io - version: v2 - kind: HelmRelease - name: rabbitmq - namespace: rabbitmq - - path: ./patches/rabbitmq-namespace.yaml - target: - version: v1 - kind: Namespace - name: rabbitmq - - path: ./patches/camunda.yaml - target: - group: helm.toolkit.fluxcd.io - version: v2 - kind: HelmRelease - name: camunda - namespace: camunda - - path: ./patches/camunda-namespace.yaml - target: - version: v1 - kind: Namespace - name: camunda - - path: ./patches/vault.yaml - target: - group: helm.toolkit.fluxcd.io - version: v2 - kind: HelmRelease - name: vault - namespace: vault - - path: ./patches/vault-namespace.yaml - target: - version: v1 - kind: Namespace - name: vault - - path: ./patches/postgresql.yaml - target: - group: helm.toolkit.fluxcd.io - version: v2 - kind: HelmRelease - name: postgresql - namespace: postgresql - - patch: |- - - op: replace - path: /metadata/namespace - value: zitadel - - op: replace - path: /spec/values/primary/nodeSelector - value: - dedicated: null - node.deckhouse.io/group: generic - - op: replace - path: /spec/values/primary/tolerations - value: - - key: dedicated.deckhouse.io - operator: Equal - value: generic - target: - group: helm.toolkit.fluxcd.io - version: v2 - kind: HelmRelease - name: postgresql - namespace: postgresql - - path: ./patches/postgresql-namespace-delete.yaml - target: - version: v1 - kind: Namespace - name: postgresql - - path: ./patches/zitadel.yaml - target: - group: helm.toolkit.fluxcd.io - version: v2 - kind: HelmRelease - name: zitadel - namespace: zitadel - - path: ./patches/zitadel-namespace.yaml - target: - version: v1 - kind: Namespace - name: zitadel - - path: ./patches/istio-config.yaml - target: - group: helm.toolkit.fluxcd.io - version: v2 - kind: HelmRelease - name: istio-config - namespace: default diff --git a/clusters/d8-ugmk-prod/kustomization.yaml b/clusters/d8-ugmk-prod/kustomization.yaml index dcb749b..7d035fd 100644 --- a/clusters/d8-ugmk-prod/kustomization.yaml +++ b/clusters/d8-ugmk-prod/kustomization.yaml @@ -3,5 +3,14 @@ kind: Kustomization resources: - ./flux-system - ./helm-repositories.yaml - - ./infrastructure + +# infrastructure + - ../../infrastructure/kafka/d8-ugmk-prod + - ../../infrastructure/rabbitmq/d8-ugmk-prod + - ../../infrastructure/camunda/d8-ugmk-prod + - ../../infrastructure/vault/d8-ugmk-prod + - ../../infrastructure/postgresql/d8-ugmk-prod + - ../../infrastructure/zitadel/d8-ugmk-prod + - ../../infrastructure/istio-config/d8-ugmk-prod + - ./bootstrap-jobs diff --git a/clusters/d8-ugmk-prod/infrastructure/patches/istio-config.yaml b/infrastructure/istio-config/d8-ugmk-prod/istio-config.yaml similarity index 100% rename from clusters/d8-ugmk-prod/infrastructure/patches/istio-config.yaml rename to infrastructure/istio-config/d8-ugmk-prod/istio-config.yaml diff --git a/infrastructure/istio-config/d8-ugmk-prod/kustomization.yaml b/infrastructure/istio-config/d8-ugmk-prod/kustomization.yaml new file mode 100644 index 0000000..894c51a --- /dev/null +++ b/infrastructure/istio-config/d8-ugmk-prod/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - ../base +patches: + - path: istio-config.yaml