mirror of
https://github.com/external-secrets/external-secrets.git
synced 2024-12-14 11:57:59 +00:00
chore(helm): Add extra labels to the validating webhooks (#4074)
It should add a bunch of app.kubernetes.io labels Signed-off-by: Miguel Sacristán Izcue <miguel_tete17@hotmail.com> Co-authored-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
This commit is contained in:
parent
d4d4f4bc4b
commit
a9ba8b2bc8
3 changed files with 15 additions and 7 deletions
|
@ -4,10 +4,8 @@ kind: ValidatingWebhookConfiguration
|
|||
metadata:
|
||||
name: secretstore-validate
|
||||
labels:
|
||||
{{- include "external-secrets-webhook.labels" . | nindent 4 }}
|
||||
external-secrets.io/component: webhook
|
||||
{{- with .Values.commonLabels }}
|
||||
{{ toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if and .Values.webhook.certManager.enabled .Values.webhook.certManager.addInjectorAnnotations }}
|
||||
annotations:
|
||||
cert-manager.io/inject-ca-from: {{ template "external-secrets.namespace" . }}/{{ include "external-secrets.fullname" . }}-webhook
|
||||
|
@ -50,10 +48,8 @@ kind: ValidatingWebhookConfiguration
|
|||
metadata:
|
||||
name: externalsecret-validate
|
||||
labels:
|
||||
{{- include "external-secrets-webhook.labels" . | nindent 4 }}
|
||||
external-secrets.io/component: webhook
|
||||
{{- with .Values.commonLabels }}
|
||||
{{ toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if and .Values.webhook.certManager.enabled .Values.webhook.certManager.addInjectorAnnotations }}
|
||||
annotations:
|
||||
cert-manager.io/inject-ca-from: {{ template "external-secrets.namespace" . }}/{{ include "external-secrets.fullname" . }}-webhook
|
||||
|
|
|
@ -4,7 +4,7 @@ should match snapshot of default values:
|
|||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.16.3
|
||||
controller-gen.kubebuilder.io/version: v0.16.5
|
||||
labels:
|
||||
external-secrets.io/component: controller
|
||||
name: secretstores.external-secrets.io
|
||||
|
|
|
@ -161,6 +161,18 @@ tests:
|
|||
templates:
|
||||
- validatingwebhook.yaml
|
||||
- crds/externalsecret.yaml
|
||||
- it: should have the correct labels
|
||||
set:
|
||||
webhook.create: true
|
||||
templates:
|
||||
- validatingwebhook.yaml
|
||||
asserts:
|
||||
- equal:
|
||||
path: metadata.labels["app.kubernetes.io/name"]
|
||||
value: "external-secrets-webhook"
|
||||
- equal:
|
||||
path: metadata.labels["app.kubernetes.io/instance"]
|
||||
value: "RELEASE-NAME"
|
||||
- it: should override metrics port
|
||||
set:
|
||||
webhook.metrics.listen.port: 8888
|
||||
|
|
Loading…
Reference in a new issue