-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- add (optional) mutating wehhook which will add hash on creation of deployments. this will prevent pod restarts when configmaps/secrets already exist - fix non-404 error handle when loading children - fix RBACs
- Loading branch information
Showing
20 changed files
with
607 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,4 +37,10 @@ rules: | |
- update | ||
- patch | ||
- watch | ||
- verbs: | ||
- '*' | ||
apiGroups: | ||
- coordination.k8s.io | ||
resources: | ||
- leases | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
--- | ||
{{- if .Values.webhooks.enabled }} | ||
apiVersion: admissionregistration.k8s.io/v1 | ||
kind: MutatingWebhookConfiguration | ||
metadata: | ||
name: '{{ template "wave-fullname" . }}-mutating-webhook-configuration' | ||
annotations: | ||
cert-manager.io/inject-ca-from: '{{ .Release.Namespace }}/{{ template "wave-fullname" . }}-serving-cert' | ||
webhooks: | ||
- admissionReviewVersions: | ||
- v1 | ||
clientConfig: | ||
service: | ||
name: '{{ template "wave-fullname" . }}-webhook-service' | ||
namespace: '{{ .Release.Namespace }}' | ||
path: /mutate-apps-v1-deployment | ||
failurePolicy: Ignore | ||
name: deployments.wave.pusher.com | ||
rules: | ||
- apiGroups: | ||
- apps | ||
apiVersions: | ||
- v1 | ||
operations: | ||
- CREATE | ||
- UPDATE | ||
resources: | ||
- deployments | ||
sideEffects: NoneOnDryRun | ||
- admissionReviewVersions: | ||
- v1 | ||
clientConfig: | ||
service: | ||
name: '{{ template "wave-fullname" . }}-webhook-service' | ||
namespace: '{{ .Release.Namespace }}' | ||
path: /mutate-apps-v1-statefulset | ||
failurePolicy: Ignore | ||
name: statefulsets.wave.pusher.com | ||
rules: | ||
- apiGroups: | ||
- apps | ||
apiVersions: | ||
- v1 | ||
operations: | ||
- CREATE | ||
- UPDATE | ||
resources: | ||
- statefulsets | ||
sideEffects: NoneOnDryRun | ||
- admissionReviewVersions: | ||
- v1 | ||
clientConfig: | ||
service: | ||
name: '{{ template "wave-fullname" . }}-webhook-service' | ||
namespace: '{{ .Release.Namespace }}' | ||
path: /mutate-apps-v1-daemonset | ||
failurePolicy: Ignore | ||
name: daemonsets.wave.pusher.com | ||
rules: | ||
- apiGroups: | ||
- apps | ||
apiVersions: | ||
- v1 | ||
operations: | ||
- CREATE | ||
- UPDATE | ||
resources: | ||
- daemonsets | ||
sideEffects: NoneOnDryRun | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{{- if .Values.webhooks.enabled }} | ||
# The following manifests contain a self-signed issuer CR and a certificate CR. | ||
# More document can be found at https://docs.cert-manager.io | ||
apiVersion: cert-manager.io/v1 | ||
kind: Issuer | ||
metadata: | ||
name: {{ template "wave-fullname" . }}-selfsigned-issuer | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
selfSigned: {} | ||
--- | ||
apiVersion: cert-manager.io/v1 | ||
kind: Certificate | ||
metadata: | ||
name: {{ template "wave-fullname" . }}-serving-cert | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
dnsNames: | ||
- {{ template "wave-fullname" . }}-webhook-service.{{ .Release.Namespace }}.svc | ||
- {{ template "wave-fullname" . }}-webhook-service.{{ .Release.Namespace }}.svc.cluster.local | ||
issuerRef: | ||
kind: Issuer | ||
name: {{ template "wave-fullname" . }}-selfsigned-issuer | ||
secretName: {{ template "wave-fullname" . }}-webhook-server-cert | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{{- if .Values.webhooks.enabled }} | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ template "wave-fullname" . }}-webhook-service | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
{{ include "wave-labels.chart" . | nindent 4 }} | ||
spec: | ||
ports: | ||
- port: 443 | ||
targetPort: 9443 | ||
selector: | ||
{{ include "wave-labels.chart" . | nindent 4 }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
--- | ||
apiVersion: admissionregistration.k8s.io/v1 | ||
kind: MutatingWebhookConfiguration | ||
metadata: | ||
name: mutating-webhook-configuration | ||
webhooks: | ||
- admissionReviewVersions: | ||
- v1 | ||
clientConfig: | ||
service: | ||
name: webhook-service | ||
namespace: system | ||
path: /mutate-apps-v1-daemonset | ||
failurePolicy: Ignore | ||
name: daemonsets.wave.pusher.com | ||
rules: | ||
- apiGroups: | ||
- apps | ||
apiVersions: | ||
- v1 | ||
operations: | ||
- CREATE | ||
- UPDATE | ||
resources: | ||
- daemonsets | ||
sideEffects: NoneOnDryRun | ||
- admissionReviewVersions: | ||
- v1 | ||
clientConfig: | ||
service: | ||
name: webhook-service | ||
namespace: system | ||
path: /mutate-apps-v1-deployment | ||
failurePolicy: Ignore | ||
name: deployments.wave.pusher.com | ||
rules: | ||
- apiGroups: | ||
- apps | ||
apiVersions: | ||
- v1 | ||
operations: | ||
- CREATE | ||
- UPDATE | ||
resources: | ||
- deployments | ||
sideEffects: NoneOnDryRun | ||
- admissionReviewVersions: | ||
- v1 | ||
clientConfig: | ||
service: | ||
name: webhook-service | ||
namespace: system | ||
path: /mutate-apps-v1-statefulset | ||
failurePolicy: Ignore | ||
name: statefulsets.wave.pusher.com | ||
rules: | ||
- apiGroups: | ||
- apps | ||
apiVersions: | ||
- v1 | ||
operations: | ||
- CREATE | ||
- UPDATE | ||
resources: | ||
- statefulsets | ||
sideEffects: NoneOnDryRun |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.