arttor/helmify

View on GitHub
examples/operator/templates/mutating-webhook-configuration.yaml

Summary

Maintainability
Test Coverage
apiVersion: admissionregistration.k8s.io/v1
kind: MutatingWebhookConfiguration
metadata:
  name: {{ include "operator.fullname" . }}-mutating-webhook-configuration
  annotations:
    cert-manager.io/inject-ca-from: {{ .Release.Namespace }}/{{ include "operator.fullname" . }}-serving-cert
  labels:
  {{- include "operator.labels" . | nindent 4 }}
webhooks:
- admissionReviewVersions:
  - v1
  clientConfig:
    service:
      name: '{{ include "operator.fullname" . }}-webhook-service'
      namespace: '{{ .Release.Namespace }}'
      path: /mutate-ceph-example-com-v1-mycluster
  failurePolicy: Fail
  name: mmycluster.kb.io
  rules:
  - apiGroups:
    - test.example.com
    apiVersions:
    - v1
    operations:
    - CREATE
    - UPDATE
    resources:
    - myclusters
  sideEffects: None