apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
  - ../base
patches:
  - path: postgresql.yaml
  - patch: |-
      - op: replace
        path: /metadata/namespace
        value: zitadel
      - op: replace
        path: /spec/values/primary/nodeSelector
        value:
          dedicated: null
          kubernetes.io/hostname: um-sarex-k8s-master-01
      - op: replace
        path: /spec/values/primary/tolerations
        value:
          - key: node-role.kubernetes.io/control-plane
            operator: Exists
            effect: NoSchedule
    target:
      group: helm.toolkit.fluxcd.io
      version: v2
      kind: HelmRelease
      name: postgresql
      namespace: postgresql
  - path: postgresql-namespace-delete.yaml
