---
apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
metadata:
  creationTimestamp: null
  name: metrics-validating-webhook-configuration
  labels:
    keptn.sh/inject-cert: "true"
webhooks:
  - admissionReviewVersions:
      - v1
    clientConfig:
      service:
        name: metrics-webhook-service
        namespace: system
        path: /validate-metrics-keptn-sh-v1-keptnmetric
    failurePolicy: Fail
    name: vkeptnmetric.kb.io
    rules:
      - apiGroups:
          - metrics.keptn.sh
        apiVersions:
          - v1
        operations:
          - CREATE
          - UPDATE
        resources:
          - keptnmetrics
    sideEffects: None
  - admissionReviewVersions:
      - v1
    clientConfig:
      service:
        name: metrics-webhook-service
        namespace: system
        path: /validate-metrics-keptn-sh-v1-analysisdefinition
    failurePolicy: Fail
    name: vanalysisdefinition.kb.io
    rules:
      - apiGroups:
          - metrics.keptn.sh
        apiVersions:
          - v1
        operations:
          - CREATE
          - UPDATE
        resources:
          - analysisdefinitions
    sideEffects: None
  - admissionReviewVersions:
      - v1
    clientConfig:
      service:
        name: metrics-webhook-service
        namespace: system
        path: /validate-metrics-keptn-sh-v1-analysis
    failurePolicy: Fail
    name: vanalysis.kb.io
    rules:
      - apiGroups:
          - metrics.keptn.sh
        apiVersions:
          - v1
        operations:
          - CREATE
          - UPDATE
        resources:
          - analyses
    sideEffects: None
