Skip to content

Commit

Permalink
Add default values to the webhook configuration (#2)
Browse files Browse the repository at this point in the history
* chore: added some standard fields to the webhook

* chore: bumped chart version
  • Loading branch information
puffitos authored Nov 28, 2024
1 parent ae2ee50 commit 1cbb2ff
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
8 changes: 4 additions & 4 deletions chart/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ apiVersion: v2
name: navlinkswebhook
description: A Helm chart for Admission Webhook to create Navlinks for Prometheus
type: application
version: 2.0.0
version: 2.0.1
appVersion: "2.0.0"
maintainers:
- name: eumel8
email: [email protected]
url: https://www.telekom.com
- name: eumel8
email: [email protected]
url: https://www.telekom.com
5 changes: 5 additions & 0 deletions chart/templates/admission.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ webhooks:
- admissionReviewVersions:
- v1
name: {{ .Values.admission.webhook.name }}
matchPolicy: {{ .Values.admission.matchPolicy }}
namespaceSelector:
matchExpressions:
- key: kubernetes.io/metadata.name
Expand All @@ -31,11 +32,15 @@ webhooks:
name: {{ include "navlinkswebhook.fullname" . }}
namespace: {{ .Release.Namespace | default "default" }}
path: "/validate"
port: 443
caBundle: {{ $ca.Cert | b64enc }}
rules:
- operations: ["CREATE","DELETE"]
apiGroups: ["monitoring.coreos.com"]
apiVersions: ["v1"]
resources: ["prometheuses"]
scope: "*"
objectSelector: {}
failurePolicy: {{ .Values.admission.failurePolicy }}
sideEffects: {{ .Values.admission.sideEffects }}
timeoutSeconds: {{ .Values.admission.timeoutSeconds }}
2 changes: 2 additions & 0 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ admission:
name: webhook.example.com
# list of excluded namespaces, comma-separated
# exclude: default, kube-system, cattle-system
matchPolicy: Equivalent
timeoutSeconds: 10

podAnnotations: {}

Expand Down

0 comments on commit 1cbb2ff

Please sign in to comment.