apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
metadata:
  name: mariadb-operator-webhook
  labels:
    helm.sh/chart: mariadb-operator-25.10.3
    app.kubernetes.io/name: mariadb-operator-webhook
    app.kubernetes.io/instance: mariadb-operator
    app.kubernetes.io/version: "25.10.3"
    app.kubernetes.io/managed-by: Helm
  annotations:
    k8s.mariadb.com/webhook: ""
webhooks:
  - admissionReviewVersions:
      - v1
    clientConfig:
      service:
        name: mariadb-operator-webhook
        namespace: mariadb-operator
        path: /validate-k8s-mariadb-com-v1alpha1-backup
    failurePolicy: Fail
    name: vbackup-v1alpha1.kb.io
    rules:
      - apiGroups:
          - k8s.mariadb.com
        apiVersions:
          - v1alpha1
        operations:
          - CREATE
          - UPDATE
        resources:
          - backups
    sideEffects: None
  - admissionReviewVersions:
      - v1
    clientConfig:
      service:
        name: mariadb-operator-webhook
        namespace: mariadb-operator
        path: /validate-k8s-mariadb-com-v1alpha1-physicalbackup
    failurePolicy: Fail
    name: vphysicalbackup-v1alpha1.kb.io
    rules:
      - apiGroups:
          - k8s.mariadb.com
        apiVersions:
          - v1alpha1
        operations:
          - CREATE
          - UPDATE
        resources:
          - physicalbackups
    sideEffects: None
  - admissionReviewVersions:
      - v1
    clientConfig:
      service:
        name: mariadb-operator-webhook
        namespace: mariadb-operator
        path: /validate-k8s-mariadb-com-v1alpha1-connection
    failurePolicy: Fail
    name: vconnection-v1alpha1.kb.io
    rules:
      - apiGroups:
          - k8s.mariadb.com
        apiVersions:
          - v1alpha1
        operations:
          - CREATE
          - UPDATE
        resources:
          - connections
    sideEffects: None
  - admissionReviewVersions:
      - v1
    clientConfig:
      service:
        name: mariadb-operator-webhook
        namespace: mariadb-operator
        path: /validate-k8s-mariadb-com-v1alpha1-database
    failurePolicy: Fail
    name: vdatabase-v1alpha1.kb.io
    rules:
      - apiGroups:
          - k8s.mariadb.com
        apiVersions:
          - v1alpha1
        operations:
          - CREATE
          - UPDATE
        resources:
          - databases
    sideEffects: None
  - admissionReviewVersions:
      - v1
    clientConfig:
      service:
        name: mariadb-operator-webhook
        namespace: mariadb-operator
        path: /validate-k8s-mariadb-com-v1alpha1-grant
    failurePolicy: Fail
    name: vgrant-v1alpha1.kb.io
    rules:
      - apiGroups:
          - k8s.mariadb.com
        apiVersions:
          - v1alpha1
        operations:
          - CREATE
          - UPDATE
        resources:
          - grants
    sideEffects: None
  - admissionReviewVersions:
      - v1
    clientConfig:
      service:
        name: mariadb-operator-webhook
        namespace: mariadb-operator
        path: /validate-k8s-mariadb-com-v1alpha1-mariadb
    failurePolicy: Fail
    name: vmariadb-v1alpha1.kb.io
    rules:
      - apiGroups:
          - k8s.mariadb.com
        apiVersions:
          - v1alpha1
        operations:
          - CREATE
          - UPDATE
        resources:
          - mariadbs
    sideEffects: None
  - admissionReviewVersions:
      - v1
    clientConfig:
      service:
        name: mariadb-operator-webhook
        namespace: mariadb-operator
        path: /validate-k8s-mariadb-com-v1alpha1-maxscale
    failurePolicy: Fail
    name: vmaxscale-v1alpha1.kb.io
    rules:
      - apiGroups:
          - k8s.mariadb.com
        apiVersions:
          - v1alpha1
        operations:
          - CREATE
          - UPDATE
        resources:
          - maxscales
    sideEffects: None
  - admissionReviewVersions:
      - v1
    clientConfig:
      service:
        name: mariadb-operator-webhook
        namespace: mariadb-operator
        path: /validate-k8s-mariadb-com-v1alpha1-restore
    failurePolicy: Fail
    name: vrestore-v1alpha1.kb.io
    rules:
      - apiGroups:
          - k8s.mariadb.com
        apiVersions:
          - v1alpha1
        operations:
          - CREATE
          - UPDATE
        resources:
          - restores
    sideEffects: None
  - admissionReviewVersions:
      - v1
    clientConfig:
      service:
        name: mariadb-operator-webhook
        namespace: mariadb-operator
        path: /validate-k8s-mariadb-com-v1alpha1-sqljob
    failurePolicy: Fail
    name: vsqljob-v1alpha1.kb.io
    rules:
      - apiGroups:
          - k8s.mariadb.com
        apiVersions:
          - v1alpha1
        operations:
          - CREATE
          - UPDATE
        resources:
          - sqljobs
    sideEffects: None
  - admissionReviewVersions:
      - v1
    clientConfig:
      service:
        name: mariadb-operator-webhook
        namespace: mariadb-operator
        path: /validate-k8s-mariadb-com-v1alpha1-user
    failurePolicy: Fail
    name: vuser-v1alpha1.kb.io
    rules:
      - apiGroups:
          - k8s.mariadb.com
        apiVersions:
          - v1alpha1
        operations:
          - CREATE
          - UPDATE
        resources:
          - users
    sideEffects: None
