apiVersion: admissionregistration.k8s.io/v1
kind: MutatingWebhookConfiguration
metadata:
  name: cnpg-mutating-webhook-configuration
  labels:
    helm.sh/chart: cloudnative-pg-0.27.0
    app.kubernetes.io/name: cloudnative-pg
    app.kubernetes.io/instance: cloudnative-pg
    app.kubernetes.io/version: "1.28.0"
    app.kubernetes.io/managed-by: Helm
webhooks:
  - admissionReviewVersions:
      - v1
    clientConfig:
      service:
        name: cnpg-webhook-service
        namespace: cloudnative-pg
        path: /mutate-postgresql-cnpg-io-v1-backup
        port: 443
    failurePolicy: Fail
    name: mbackup.cnpg.io
    rules:
      - apiGroups:
          - postgresql.cnpg.io
        apiVersions:
          - v1
        operations:
          - CREATE
          - UPDATE
        resources:
          - backups
    sideEffects: None
  - admissionReviewVersions:
      - v1
    clientConfig:
      service:
        name: cnpg-webhook-service
        namespace: cloudnative-pg
        path: /mutate-postgresql-cnpg-io-v1-cluster
        port: 443
    failurePolicy: Fail
    name: mcluster.cnpg.io
    rules:
      - apiGroups:
          - postgresql.cnpg.io
        apiVersions:
          - v1
        operations:
          - CREATE
          - UPDATE
        resources:
          - clusters
    sideEffects: None
  - admissionReviewVersions:
      - v1
    clientConfig:
      service:
        name: cnpg-webhook-service
        namespace: cloudnative-pg
        path: /mutate-postgresql-cnpg-io-v1-database
        port: 443
    failurePolicy: Fail
    name: mdatabase.cnpg.io
    rules:
      - apiGroups:
          - postgresql.cnpg.io
        apiVersions:
          - v1
        operations:
          - CREATE
          - UPDATE
        resources:
          - databases
    sideEffects: None
  - admissionReviewVersions:
      - v1
    clientConfig:
      service:
        name: cnpg-webhook-service
        namespace: cloudnative-pg
        path: /mutate-postgresql-cnpg-io-v1-scheduledbackup
        port: 443
    failurePolicy: Fail
    name: mscheduledbackup.cnpg.io
    rules:
      - apiGroups:
          - postgresql.cnpg.io
        apiVersions:
          - v1
        operations:
          - CREATE
          - UPDATE
        resources:
          - scheduledbackups
    sideEffects: None
