# Source: opentelemetry-operator/templates/admission-webhooks/operator-webhook-with-cert-manager.yaml
apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
metadata:
  annotations:
    cert-manager.io/inject-ca-from: vynil-monitor/open-telemetry-opentelemetry-operator-serving-cert
  labels:
    helm.sh/chart: opentelemetry-operator-0.49.1
    app.kubernetes.io/name: opentelemetry-operator
    app.kubernetes.io/version: "0.95.0"
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/instance: open-telemetry
    app.kubernetes.io/component: webhook
  name: open-telemetry-opentelemetry-operator-validation
webhooks:
  - admissionReviewVersions:
      - v1
    clientConfig:
      service:
        name: open-telemetry-opentelemetry-operator-webhook
        namespace: vynil-monitor
        path: /validate-opentelemetry-io-v1alpha1-instrumentation
        port: 443
    failurePolicy: Fail
    name: vinstrumentationcreateupdate.kb.io
    rules:
    - apiGroups:
        - opentelemetry.io
      apiVersions:
        - v1alpha1
      operations:
        - CREATE
        - UPDATE
      resources:
        - instrumentations
      scope: Namespaced
    sideEffects: None
    timeoutSeconds: 10
  - admissionReviewVersions:
      - v1
    clientConfig:
      service:
        name: open-telemetry-opentelemetry-operator-webhook
        namespace: vynil-monitor
        path: /validate-opentelemetry-io-v1alpha1-instrumentation
        port: 443
    failurePolicy: Ignore
    name: vinstrumentationdelete.kb.io
    rules:
      - apiGroups:
          - opentelemetry.io
        apiVersions:
          - v1alpha1
        operations:
          - DELETE
        resources:
          - instrumentations
        scope: Namespaced
    sideEffects: None
    timeoutSeconds: 10
  - admissionReviewVersions:
      - v1
    clientConfig:
      service:
        name: open-telemetry-opentelemetry-operator-webhook
        namespace: vynil-monitor
        path: /validate-opentelemetry-io-v1alpha1-opentelemetrycollector
        port: 443
    failurePolicy: Fail
    name: vopentelemetrycollectorcreateupdate.kb.io
    rules:
      - apiGroups:
          - opentelemetry.io
        apiVersions:
          - v1alpha1
        operations:
          - CREATE
          - UPDATE
        resources:
          - opentelemetrycollectors
        scope: Namespaced
    sideEffects: None
    timeoutSeconds: 10
  - admissionReviewVersions:
      - v1
    clientConfig:
      service:
        name: open-telemetry-opentelemetry-operator-webhook
        namespace: vynil-monitor
        path: /validate-opentelemetry-io-v1alpha1-opentelemetrycollector
        port: 443
    failurePolicy: Ignore
    name: vopentelemetrycollectordelete.kb.io
    rules:
      - apiGroups:
          - opentelemetry.io
        apiVersions:
          - v1alpha1
        operations:
          - DELETE
        resources:
          - opentelemetrycollectors
        scope: Namespaced
    sideEffects: None
    timeoutSeconds: 10