---
apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
metadata:
  annotations:
    cert-manager.io/inject-ca-from: opentelemetry-operator-system/opentelemetry-operator-serving-cert
  labels:
    app.kubernetes.io/name: opentelemetry-operator
  name: opentelemetry-operator-validating-webhook-configuration
webhooks:
  - admissionReviewVersions:
      - v1
    clientConfig:
      service:
        name: opentelemetry-operator-webhook-service
        namespace: opentelemetry-operator-system
        path: /validate-opentelemetry-io-v1beta1-opentelemetrycollector
    failurePolicy: Fail
    name: vopentelemetrycollectorcreateupdatebeta.kb.io
    rules:
      - apiGroups:
          - opentelemetry.io
        apiVersions:
          - v1beta1
        operations:
          - CREATE
          - UPDATE
        resources:
          - opentelemetrycollectors
    sideEffects: None
  - admissionReviewVersions:
      - v1
    clientConfig:
      service:
        name: opentelemetry-operator-webhook-service
        namespace: opentelemetry-operator-system
        path: /validate-opentelemetry-io-v1beta1-opentelemetrycollector
    failurePolicy: Ignore
    name: vopentelemetrycollectordeletebeta.kb.io
    rules:
      - apiGroups:
          - opentelemetry.io
        apiVersions:
          - v1beta1
        operations:
          - DELETE
        resources:
          - opentelemetrycollectors
    sideEffects: None
  - admissionReviewVersions:
      - v1
    clientConfig:
      service:
        name: opentelemetry-operator-webhook-service
        namespace: opentelemetry-operator-system
        path: /validate-opentelemetry-io-v1alpha1-instrumentation
    failurePolicy: Fail
    name: vinstrumentationcreateupdate.kb.io
    rules:
      - apiGroups:
          - opentelemetry.io
        apiVersions:
          - v1alpha1
        operations:
          - CREATE
          - UPDATE
        resources:
          - instrumentations
    sideEffects: None
  - admissionReviewVersions:
      - v1
    clientConfig:
      service:
        name: opentelemetry-operator-webhook-service
        namespace: opentelemetry-operator-system
        path: /validate-opentelemetry-io-v1alpha1-instrumentation
    failurePolicy: Ignore
    name: vinstrumentationdelete.kb.io
    rules:
      - apiGroups:
          - opentelemetry.io
        apiVersions:
          - v1alpha1
        operations:
          - DELETE
        resources:
          - instrumentations
    sideEffects: None
  - admissionReviewVersions:
      - v1
    clientConfig:
      service:
        name: opentelemetry-operator-webhook-service
        namespace: opentelemetry-operator-system
        path: /validate-opentelemetry-io-v1alpha1-opampbridge
    failurePolicy: Fail
    name: vopampbridgecreateupdate.kb.io
    rules:
      - apiGroups:
          - opentelemetry.io
        apiVersions:
          - v1alpha1
        operations:
          - CREATE
          - UPDATE
        resources:
          - opampbridges
    sideEffects: None
  - admissionReviewVersions:
      - v1
    clientConfig:
      service:
        name: opentelemetry-operator-webhook-service
        namespace: opentelemetry-operator-system
        path: /validate-opentelemetry-io-v1alpha1-opampbridge
    failurePolicy: Ignore
    name: vopampbridgedelete.kb.io
    rules:
      - apiGroups:
          - opentelemetry.io
        apiVersions:
          - v1alpha1
        operations:
          - DELETE
        resources:
          - opampbridges
    sideEffects: None
  - admissionReviewVersions:
      - v1
    clientConfig:
      service:
        name: opentelemetry-operator-webhook-service
        namespace: opentelemetry-operator-system
        path: /validate-opentelemetry-io-v1beta1-targetallocator
    failurePolicy: Fail
    name: vtargetallocatorcreateupdatebeta.kb.io
    rules:
      - apiGroups:
          - opentelemetry.io
        apiVersions:
          - v1beta1
        operations:
          - CREATE
          - UPDATE
        resources:
          - targetallocators
    sideEffects: None
  - admissionReviewVersions:
      - v1
    clientConfig:
      service:
        name: opentelemetry-operator-webhook-service
        namespace: opentelemetry-operator-system
        path: /validate-opentelemetry-io-v1beta1-targetallocator
    failurePolicy: Ignore
    name: vtargetallocatordeletebeta.kb.io
    rules:
      - apiGroups:
          - opentelemetry.io
        apiVersions:
          - v1beta1
        operations:
          - DELETE
        resources:
          - targetallocators
    sideEffects: None
