diff --git a/helm/imagepullsecret-injector/Chart.yaml b/helm/imagepullsecret-injector/Chart.yaml index 6c53bb6..1b9a3b6 100644 --- a/helm/imagepullsecret-injector/Chart.yaml +++ b/helm/imagepullsecret-injector/Chart.yaml @@ -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 diff --git a/helm/imagepullsecret-injector/templates/_helpers.tpl b/helm/imagepullsecret-injector/templates/_helpers.tpl index 0b78acf..746ebcf 100644 --- a/helm/imagepullsecret-injector/templates/_helpers.tpl +++ b/helm/imagepullsecret-injector/templates/_helpers.tpl @@ -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}'` */ -}} diff --git a/helm/imagepullsecret-injector/templates/certificate-gen/cronjob-certificate-gen.yaml b/helm/imagepullsecret-injector/templates/certificate-gen/cronjob-certificate-gen.yaml index f0ea4ac..372bb3f 100644 --- a/helm/imagepullsecret-injector/templates/certificate-gen/cronjob-certificate-gen.yaml +++ b/helm/imagepullsecret-injector/templates/certificate-gen/cronjob-certificate-gen.yaml @@ -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 diff --git a/helm/imagepullsecret-injector/templates/certificate-gen/job-certificate-gen.yaml b/helm/imagepullsecret-injector/templates/certificate-gen/job-certificate-gen.yaml index 0161eef..d3ad923 100644 --- a/helm/imagepullsecret-injector/templates/certificate-gen/job-certificate-gen.yaml +++ b/helm/imagepullsecret-injector/templates/certificate-gen/job-certificate-gen.yaml @@ -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 diff --git a/helm/imagepullsecret-injector/templates/deployment.yaml b/helm/imagepullsecret-injector/templates/deployment.yaml index e9cd8c9..af4782d 100644 --- a/helm/imagepullsecret-injector/templates/deployment.yaml +++ b/helm/imagepullsecret-injector/templates/deployment.yaml @@ -49,4 +49,4 @@ spec: volumes: - name: webhook-certs secret: - secretName: imagepullsecret-injector-webhook-certs \ No newline at end of file + secretName: {{ include "imagepullsecret-injector.certificateSecretName" . }} \ No newline at end of file