Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More configuration options for the validatingwebhookconfiguration #64

Merged
merged 5 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# build stage
FROM golang:1.23 AS build-env
WORKDIR /app
COPY . /app
Expand Down
13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,16 @@ e2e-cleanup:
@k3d cluster delete cosign-tests || echo "Deleting cosign tests k3d cluster failed. Continuing..."
@rm -f cosign.pub cosign.key second.pub second.key || echo "Removing files failed. Continuing..."
@echo "Done."

#############
### CHART ###
#############

.PHONY: chart-lint chart
chart-lint:
@echo "Linting chart..."
@helm lint chart

chart:
@echo "Packaging chart..."
@helm package chart
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
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 "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: "*"
objectSelector: {}
failurePolicy: {{ .Values.admission.failurePolicy }}
sideEffects: {{ .Values.admission.sideEffects }}
timeoutSeconds: {{ .Values.admission.timeoutSeconds }}
3 changes: 3 additions & 0 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ admission:
name: webhook.example.com
# list of excluded namespaces, comma-separated
# exclude: default, kube-system, cattle-system
exclude: ""
matchPolicy: Equivalent
timeoutSeconds: 10

podAnnotations: {}

Expand Down
Loading