Skip to content

Commit

Permalink
chore: complete validatingwebhookconfiguration
Browse files Browse the repository at this point in the history
The validating webhook configuration is missing some fields,
which are automatically completed by k8s. Those missing fields can sometimes mess up gitops operators, which strictly check which fields are present or not

Signed-off-by: Bruno Bressi <[email protected]>
  • Loading branch information
puffitos committed Nov 12, 2024
1 parent 4e18454 commit ffed19e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# build stage
ARG HTTP_PROXY
ARG HTTPS_PROXY
FROM golang:1.23 AS build-env
WORKDIR /app
COPY . /app
Expand Down
14 changes: 7 additions & 7 deletions chart/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ apiVersion: v2
name: cosignwebhook
description: A Helm chart for Cosign Webhook Admission Controller
type: application
version: 4.1.0
version: 4.1.1
appVersion: "4.3.0"
maintainers:
- name: eumel8
email: [email protected]
url: https://www.telekom.com
- name: puffitos
email: [email protected]
url: https://www.telekom.com
- name: eumel8
email: [email protected]
url: https://www.telekom.com
- name: puffitos
email: [email protected]
url: https://www.telekom.com
3 changes: 3 additions & 0 deletions chart/templates/admission.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,19 @@ webhooks:
- key: kubernetes.io/metadata.name
operator: NotIn
values: [{{ .Release.Namespace | default "default" }}{{- if .Values.admission.exclude }},{{ .Values.admission.exclude }}{{- end }}]
objectSelector: {}
clientConfig:
service:
name: {{ include "cosignwebhook.fullname" . }}
namespace: {{ .Release.Namespace | default "default" }}
path: "/validate"
port: 443
caBundle: {{ $ca.Cert | b64enc }}
rules:
- operations: ["CREATE","UPDATE"]
apiGroups: [""]
apiVersions: ["v1"]
resources: ["pods"]
scope: "*"
failurePolicy: {{ .Values.admission.failurePolicy }}
sideEffects: {{ .Values.admission.sideEffects }}

0 comments on commit ffed19e

Please sign in to comment.