apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
metadata:
  name: secretstore-validate
  labels:
    helm.sh/chart: external-secrets-1.2.0
    app.kubernetes.io/name: external-secrets-webhook
    app.kubernetes.io/instance: external-secrets
    app.kubernetes.io/version: "v1.2.0"
    app.kubernetes.io/managed-by: Helm
    external-secrets.io/component: webhook
webhooks:
  - name: "validate.secretstore.external-secrets.io"
    rules:
      - apiGroups: ["external-secrets.io"]
        apiVersions: ["v1"]
        operations: ["CREATE", "UPDATE", "DELETE"]
        resources: ["secretstores"]
        scope: "Namespaced"
    clientConfig:
      service:
        namespace: external-secrets
        name: external-secrets-webhook
        path: /validate-external-secrets-io-v1-secretstore
    admissionReviewVersions: ["v1", "v1beta1"]
    sideEffects: None
    timeoutSeconds: 5
  - name: "validate.clustersecretstore.external-secrets.io"
    rules:
      - apiGroups: ["external-secrets.io"]
        apiVersions: ["v1"]
        operations: ["CREATE", "UPDATE", "DELETE"]
        resources: ["clustersecretstores"]
        scope: "Cluster"
    clientConfig:
      service:
        namespace: external-secrets
        name: external-secrets-webhook
        path: /validate-external-secrets-io-v1-clustersecretstore
    admissionReviewVersions: ["v1", "v1beta1"]
    sideEffects: None
    timeoutSeconds: 5
