mirror of
https://github.com/ysoftdevs/imagepullsecret-injector.git
synced 2026-01-16 08:37:04 +01:00
Parametrize the certificate secret name
This commit is contained in:
@@ -15,9 +15,9 @@ type: application
|
||||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: 0.0.1
|
||||
version: 0.0.2
|
||||
|
||||
# This is the version number of the application being deployed. This version number should be
|
||||
# incremented each time you make changes to the application. Versions are not expected to
|
||||
# follow Semantic Versioning. They should reflect the version the application is using.
|
||||
appVersion: v0.0.1-b326755-dirty
|
||||
appVersion: v0.0.1
|
||||
|
||||
@@ -10,6 +10,10 @@ Expand the name of the chart.
|
||||
ips-injector-svc
|
||||
{{- end }}
|
||||
|
||||
{{- define "imagepullsecret-injector.certificateSecretName" -}}
|
||||
{{ include "imagepullsecret-injector.name" . }}-webhook-certs
|
||||
{{- end }}
|
||||
|
||||
{{- define "imagepullsecret-injector.lookupCaBundle" -}}
|
||||
{{- /* Find the name of the secret corresponding to the default SA in the default namespace */ -}}
|
||||
{{- /* Equivalent to `kubectl get sa -n default default -ojsonpath='{.secrets[0].name}'` */ -}}
|
||||
|
||||
@@ -20,6 +20,10 @@ spec:
|
||||
- name: pre-install-job
|
||||
image: "{{ .Values.certificateGeneratorImage.registry }}/{{ .Values.certificateGeneratorImage.repository }}:{{ .Values.certificateGeneratorImage.tag | default .Chart.AppVersion }}"
|
||||
command: ["/entrypoint/entrypoint.sh"]
|
||||
args:
|
||||
- --service="{{ include "imagepullsecret-injector.serviceName" . }}"
|
||||
- --namespace="{{ .Release.Namespace }}"
|
||||
- --secret="{{ include "imagepullsecret-injector.certificateSecretName" . }}"
|
||||
volumeMounts:
|
||||
- mountPath: "/entrypoint"
|
||||
name: entrypoint
|
||||
|
||||
@@ -13,6 +13,10 @@ spec:
|
||||
- name: pre-install-job
|
||||
image: "{{ .Values.certificateGeneratorImage.registry }}/{{ .Values.certificateGeneratorImage.repository }}:{{ .Values.certificateGeneratorImage.tag | default .Chart.AppVersion }}"
|
||||
command: ["/entrypoint/entrypoint.sh"]
|
||||
args:
|
||||
- --service="{{ include "imagepullsecret-injector.serviceName" . }}"
|
||||
- --namespace="{{ .Release.Namespace }}"
|
||||
- --secret="{{ include "imagepullsecret-injector.certificateSecretName" . }}"
|
||||
volumeMounts:
|
||||
- mountPath: "/entrypoint"
|
||||
name: entrypoint
|
||||
|
||||
@@ -49,4 +49,4 @@ spec:
|
||||
volumes:
|
||||
- name: webhook-certs
|
||||
secret:
|
||||
secretName: imagepullsecret-injector-webhook-certs
|
||||
secretName: {{ include "imagepullsecret-injector.certificateSecretName" . }}
|
||||
Reference in New Issue
Block a user