---
apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
metadata:
  name: hnc-validating-webhook-configuration
webhooks:
- admissionReviewVersions:
  - v1
  - v1beta1
  clientConfig:
    service:
      name: hnc-webhook-service
      namespace: hnc-system
      path: /validate-hnc-x-k8s-io-v1alpha2-subnamespaceanchors
  failurePolicy: Fail
  name: subnamespaceanchors.hnc.x-k8s.io
  rules:
  - apiGroups:
    - hnc.x-k8s.io
    apiVersions:
    - v1alpha2
    operations:
    - CREATE
    - DELETE
    resources:
    - subnamespaceanchors
  sideEffects: None
- admissionReviewVersions:
  - v1
  - v1beta1
  clientConfig:
    service:
      name: hnc-webhook-service
      namespace: hnc-system
      path: /validate-hnc-x-k8s-io-v1alpha2-hierarchyconfigurations
  failurePolicy: Fail
  name: hierarchyconfigurations.hnc.x-k8s.io
  rules:
  - apiGroups:
    - hnc.x-k8s.io
    apiVersions:
    - v1alpha2
    operations:
    - CREATE
    - UPDATE
    resources:
    - hierarchyconfigurations
  sideEffects: None
- admissionReviewVersions:
  - v1
  - v1beta1
  clientConfig:
    service:
      name: hnc-webhook-service
      namespace: hnc-system
      path: /validate-hnc-x-k8s-io-v1alpha2-hncconfigurations
  failurePolicy: Fail
  name: hncconfigurations.hnc.x-k8s.io
  rules:
  - apiGroups:
    - hnc.x-k8s.io
    apiVersions:
    - v1alpha2
    operations:
    - CREATE
    - UPDATE
    - DELETE
    resources:
    - hncconfigurations
  sideEffects: None
- admissionReviewVersions:
  - v1
  - v1beta1
  clientConfig:
    service:
      name: hnc-webhook-service
      namespace: hnc-system
      path: /validate-v1-namespace
  failurePolicy: Fail
  name: namespaces.hnc.x-k8s.io
  rules:
  - apiGroups:
    - ""
    apiVersions:
    - v1
    operations:
    - DELETE
    - CREATE
    - UPDATE
    resources:
    - namespaces
  sideEffects: None
- admissionReviewVersions:
  - v1
  - v1beta1
  clientConfig:
    service:
      name: hnc-webhook-service
      namespace: hnc-system
      path: /validate-objects
  failurePolicy: Fail
  name: objects.hnc.x-k8s.io
  namespaceSelector:
    matchExpressions:
    - key: hnc.x-k8s.io/excluded-namespace
      operator: DoesNotExist
  rules:
  - apiGroups:
    - '*'
    apiVersions:
    - '*'
    operations:
    - CREATE
    - UPDATE
    - DELETE
    resources:
    - '*'
    scope: Namespaced
  sideEffects: None
  timeoutSeconds: 2
