You've already forked athens-proxy-charts
All checks were successful
Generate README / generate-parameters (push) Successful in 9s
Helm / helm-lint (push) Successful in 10s
Helm / helm-unittest (push) Successful in 8s
Markdown linter / markdown-lint (push) Successful in 10s
Markdown linter / markdown-link-checker (push) Successful in 30s
Release / publish-chart (push) Successful in 21s
Depending on the environment or tooling in which the chart is deployed, you may or may not want to have the checksum annotation. In the past, these were enforced. The default remains that the checksum annotation is added. It now only contains a switch that allows you to optionally disable it.
76 lines
3.8 KiB
Smarty
76 lines
3.8 KiB
Smarty
---
|
|
|
|
{{/* annotations */}}
|
|
|
|
{{- define "athens-proxy.pod.annotations" }}
|
|
{{- include "athens-proxy.annotations" . }}
|
|
{{- if and .Values.certificate.enabled .Values.certificate.addSHASumAnnotation }}
|
|
{{- $secretName := include "athens-proxy.certificates.server.name" $ }}
|
|
{{- if and .Values.certificate.existingSecret.enabled (gt (len .Values.certificate.existingSecret.secretName) 0) }}
|
|
{{- $secretName = .Values.certificate.existingSecret.secretName }}
|
|
{{- end }}
|
|
{{- $secret := lookup "v1" "Secret" .Release.Namespace $secretName | toYaml }}
|
|
{{ printf "checksum/secret-%s: %s" $secretName ($secret | sha256sum) }}
|
|
{{- end }}
|
|
|
|
{{- if and .Values.config.env.enabled .Values.config.env.addSHASumAnnotation }}
|
|
{{- $secretName := include "athens-proxy.secrets.env.name" $ }}
|
|
{{- $secret := include (print $.Template.BasePath "/secretEnv.yaml") $ }}
|
|
{{- if and .Values.config.env.existingSecret.enabled (gt (len .Values.config.env.existingSecret.secretName) 0) }}
|
|
{{- $secretName = .Values.config.env.existingSecret.secretName }}
|
|
{{- $secret := lookup "v1" "Secret" .Release.Namespace $secretName | toYaml }}
|
|
{{- end }}
|
|
{{ printf "checksum/secret-%s: %s" $secretName ($secret | sha256sum) }}
|
|
{{- end }}
|
|
|
|
{{- if and .Values.config.downloadMode.enabled .Values.config.downloadMode.addSHASumAnnotation }}
|
|
{{- $configMapName := include "athens-proxy.configMap.downloadMode.name" $ }}
|
|
{{- $configMap := include (print $.Template.BasePath "/configMapDownloadMode.yaml") . }}
|
|
{{- if and .Values.config.downloadMode.existingConfigMap.enabled (gt (len .Values.config.downloadMode.existingConfigMap.configMapName) 0) }}
|
|
{{- $configMapName = .Values.config.downloadMode.existingConfigMap.configMapName }}
|
|
{{- $configMap := lookup "v1" "ConfigMap" .Release.Namespace $configMapName | toYaml }}
|
|
{{- end }}
|
|
{{ printf "checksum/config-map-%s: %s" $configMapName ($configMap | sha256sum) }}
|
|
{{- end }}
|
|
|
|
{{- if and .Values.config.gitConfig.enabled .Values.config.gitConfig.addSHASumAnnotation }}
|
|
{{- $configMapName := include "athens-proxy.configMap.gitConfig.name" $ }}
|
|
{{- $configMap := include (print $.Template.BasePath "/configMapGitConfig.yaml") . }}
|
|
{{- if and .Values.config.gitConfig.existingConfigMap.enabled (gt (len .Values.config.gitConfig.existingConfigMap.configMapName) 0) }}
|
|
{{- $configMapName = .Values.config.gitConfig.existingConfigMap.configMapName }}
|
|
{{- $configMap := lookup "v1" "ConfigMap" .Release.Namespace $configMapName | toYaml }}
|
|
{{- end }}
|
|
{{ printf "checksum/config-map-%s: %s" $configMapName ($configMap | sha256sum) }}
|
|
{{- end }}
|
|
|
|
{{- if and .Values.config.netrc.enabled .Values.config.netrc.addSHASumAnnotation }}
|
|
{{- $secretName := include "athens-proxy.secrets.netrc.name" $ }}
|
|
{{- $secret := include (print $.Template.BasePath "/secretNetRC.yaml") $ }}
|
|
{{- if and .Values.config.netrc.existingSecret.enabled (gt (len .Values.config.netrc.existingSecret.secretName) 0) }}
|
|
{{- $secretName = .Values.config.netrc.existingSecret.secretName }}
|
|
{{- $secret := lookup "v1" "Secret" .Release.Namespace $secretName | toYaml }}
|
|
{{- end }}
|
|
{{ printf "checksum/secret-%s: %s" $secretName ($secret | sha256sum) }}
|
|
{{- end }}
|
|
|
|
{{- if and .Values.config.ssh.enabled .Values.config.ssh.addSHASumAnnotation }}
|
|
{{- $secretName := include "athens-proxy.secrets.ssh.name" $ }}
|
|
{{- $secret := include (print $.Template.BasePath "/secretSSH.yaml") $ }}
|
|
{{- if and .Values.config.ssh.existingSecret.enabled (gt (len .Values.config.ssh.existingSecret.secretName) 0) }}
|
|
{{- $secretName = .Values.config.ssh.existingSecret.secretName }}
|
|
{{- $secret := lookup "v1" "Secret" .Release.Namespace $secretName | toYaml }}
|
|
{{- end }}
|
|
{{ printf "checksum/secret-%s: %s" $secretName ($secret | sha256sum) }}
|
|
{{- end }}
|
|
|
|
{{- end }}
|
|
|
|
{{/* labels */}}
|
|
|
|
{{- define "athens-proxy.pod.labels" -}}
|
|
{{ include "athens-proxy.labels" . }}
|
|
{{- end }}
|
|
|
|
{{- define "athens-proxy.pod.selectorLabels" -}}
|
|
{{ include "athens-proxy.selectorLabels" . }}
|
|
{{- end }} |