---

apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component


patches:
  # yamllint disable rule:indentation
  - patch: |-

      - op: replace
        path: /spec/enableSuperuserAccess
        value: true

      - op: add
        path: /spec/superuserSecret
        value:
          name: cluster-superuser

    # yamllint enable rule:indentation
    target:
      group: postgresql.cnpg.io
      version: v1
      kind: Cluster
