Skip to content

Commit

Permalink
chart: expose webhook configuration:
Browse files Browse the repository at this point in the history
- failurePolicy,
- reinvocationPolicy
- objectSelector
- namespaceSelector
  • Loading branch information
kasia-kujawa committed Mar 23, 2021
1 parent 0120312 commit 7355174
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@ webhooks:
name: {{ include "tailing-sidecar-operator.fullname" . }}
namespace: {{ .Release.Namespace }}
path: /add-tailing-sidecars-v1-pod
failurePolicy: Ignore
failurePolicy: {{ .Values.webhook.failurePolicy }}
reinvocationPolicy: {{ .Values.webhook.reinvocationPolicy }}
objectSelector:
{{- toYaml .Values.webhook.objectSelector | nindent 4 }}
namespaceSelector:
{{- toYaml .Values.webhook.namespaceSelector | nindent 4 }}
name: tailing-sidecar.sumologic.com
rules:
- apiGroups:
Expand Down
9 changes: 7 additions & 2 deletions helm/tailing-sidecar-operator/templates/_operator-webhook.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,13 @@ webhooks:
name: {{ include "tailing-sidecar-operator.fullname" . }}
namespace: {{ .Release.Namespace }}
path: /add-tailing-sidecars-v1-pod
failurePolicy: Ignore
name: tailing-sidecar.sumologic.com
failurePolicy: {{ .Values.webhook.failurePolicy }}
reinvocationPolicy: {{ .Values.webhook.reinvocationPolicy }}
objectSelector:
{{- toYaml .Values.webhook.objectSelector | nindent 4 }}
namespaceSelector:
{{- toYaml .Values.webhook.namespaceSelector | nindent 4 }}
name: tailing-sidecar.sumologic.com
rules:
- apiGroups:
- ""
Expand Down
15 changes: 15 additions & 0 deletions helm/tailing-sidecar-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,20 @@ sidecar:
repository: ghcr.io/sumologic/tailing-sidecar
tag: 0.2.0

# Configuration for MutatingWebhook which is used by tailing sidecar operator
# for details please see Kubernetes API Reference Docs
# e.g. https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.20/#mutatingwebhookconfiguration-v1-admissionregistration-k8s-io
webhook:
failurePolicy: Ignore
reinvocationPolicy: IfNeeded

objectSelector: {}
# matchLabels:
# tailing-sidecar: "true"

namespaceSelector: {}
# matchLabels:
# tailing-sidecar: "true"

certManager:
enabled: false

0 comments on commit 7355174

Please sign in to comment.