apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
metadata:
  namespace: bridgecrew
  name: validating-webhook
webhooks:
  - name: validate.bridgecrew.svc
    failurePolicy: Fail
    sideEffects: None
    timeoutSeconds: 30
    admissionReviewVersions: ["v1","v1beta1"]
    rules:
      - apiGroups: ["*"]
        resources:
          - "deployments"
          - "pods"
          - "clusteroles"
          - "replicasets"
        apiVersions:
          - "*"
        operations:
          - CREATE
          - UPDATE
    clientConfig:
      service:
        name: validate
        namespace: bridgecrew
        path: /validate/
      caBundle: ${CA_PEM_B64}
