mirror of https://github.com/openkruise/charts.git
44 lines
1.3 KiB
YAML
44 lines
1.3 KiB
YAML
{{- if not .Values.certificates.autoGenerated }}
|
|
apiVersion: admissionregistration.k8s.io/v1
|
|
kind: MutatingWebhookConfiguration
|
|
metadata:
|
|
annotations:
|
|
{{- if .Values.certificates.certManager.enabled }}
|
|
{{- if and (not .Values.certificates.certManager.generateCA) .Values.certificates.certManager.issuer.generate }}
|
|
cert-manager.io/inject-ca-from-secret: {{ .Values.installation.namespace }}/{{ .Values.certificates.certManager.caSecretName }}
|
|
{{- else }}
|
|
cert-manager.io/inject-ca-from: {{ .Values.installation.namespace }}/{{ .Values.kruiseGame.fullname }}-cert
|
|
{{- end }}
|
|
{{- end }}
|
|
labels:
|
|
app.kubernetes.io/name: {{ .Values.kruiseGame.fullname }}
|
|
name: kruise-game-mutating-webhook
|
|
webhooks:
|
|
- admissionReviewVersions:
|
|
- v1
|
|
- v1beta1
|
|
clientConfig:
|
|
service:
|
|
name: {{ .Values.kruiseGame.webhook.serviceName }}
|
|
namespace: {{ .Values.installation.namespace }}
|
|
path: /mutate-v1-pod
|
|
failurePolicy: {{ .Values.kruiseGame.webhook.failurePolicy }}
|
|
matchPolicy: Equivalent
|
|
name: mgameserverset.kb.io
|
|
rules:
|
|
- operations:
|
|
- CREATE
|
|
- UPDATE
|
|
- DELETE
|
|
apiGroups:
|
|
- ""
|
|
apiVersions:
|
|
- v1
|
|
resources:
|
|
- pods
|
|
objectSelector:
|
|
matchExpressions:
|
|
- key: game.kruise.io/owner-gss
|
|
operator: Exists
|
|
sideEffects: None
|
|
{{- end }} |