apiVersion: admissionregistration.k8s.io/v1
kind: MutatingWebhookConfiguration
metadata:
  name: annotation-injector-for-katib
  annotations:
    cert-manager.io/inject-ca-from: kubeflow/annotation-injector-for-katib-cert
webhooks:
- admissionReviewVersions:
  - v1beta1
  clientConfig:
    service:
      name: annotation-injector-for-job-svc
      namespace: kubeflow
      path: /api/webhook/add-annotation/job 
      port: 443
  failurePolicy: Fail
  matchPolicy: Equivalent
  name: annotation-injector-for-job-svc.kubeflow.svc  
  objectSelector: {}
  reinvocationPolicy: Never
  rules:
  - apiGroups:
    - batch
    apiVersions:
    - v1
    operations:
    - CREATE
    - UPDATE
    resources:
    - jobs
    scope: '*'
  sideEffects: None
  timeoutSeconds: 10
- admissionReviewVersions:
  - v1beta1
  clientConfig:
    service:
      name: annotation-injector-for-pod-svc
      namespace: kubeflow
      path: /api/webhook/add-annotation/pod
      port: 443
  failurePolicy: Fail
  matchPolicy: Equivalent
  name: annotation-injector-for-pod-svc.kubeflow.svc  
  objectSelector: {}
  reinvocationPolicy: Never
  rules:
  - apiGroups:
    - ""
    apiVersions:
    - v1
    operations:
    - CREATE
    - UPDATE
    resources:
    - pods
    scope: '*'
  sideEffects: None
  timeoutSeconds: 10  