You've already forked athens-proxy-charts
Compare commits
7 Commits
de615c2ff5
...
1.2.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
f54f1aca01
|
|||
|
502c78296e
|
|||
|
28c1e37e13
|
|||
|
757469762b
|
|||
| f1a47dc0a5 | |||
| d86bf91491 | |||
|
80d3b9972b
|
@@ -4,6 +4,14 @@
|
|||||||
|
|
||||||
{{- define "athens-proxy.pod.annotations" }}
|
{{- define "athens-proxy.pod.annotations" }}
|
||||||
{{- include "athens-proxy.annotations" . }}
|
{{- include "athens-proxy.annotations" . }}
|
||||||
|
{{- if and .Values.certificate.enabled }}
|
||||||
|
{{- $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 }}
|
||||||
|
{{ printf "checksum/secret-%s: %s" $secretName ($secret | toYaml | sha256sum) }}
|
||||||
|
{{- end }}
|
||||||
{{- if and .Values.config.env.enabled (not .Values.config.env.existingSecret.enabled) }}
|
{{- if and .Values.config.env.enabled (not .Values.config.env.existingSecret.enabled) }}
|
||||||
{{ printf "checksum/secret-%s: %s" (include "athens-proxy.secrets.env.name" $) (include (print $.Template.BasePath "/secretEnv.yaml") . | sha256sum) }}
|
{{ printf "checksum/secret-%s: %s" (include "athens-proxy.secrets.env.name" $) (include (print $.Template.BasePath "/secretEnv.yaml") . | sha256sum) }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
@@ -21,8 +29,6 @@
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{{/* labels */}}
|
{{/* labels */}}
|
||||||
|
|
||||||
{{- define "athens-proxy.pod.labels" -}}
|
{{- define "athens-proxy.pod.labels" -}}
|
||||||
|
|||||||
@@ -46,6 +46,44 @@ tests:
|
|||||||
certificate.new.issuerRef.kind: ClusterIssuer
|
certificate.new.issuerRef.kind: ClusterIssuer
|
||||||
certificate.new.issuerRef.name: MyIssuer
|
certificate.new.issuerRef.name: MyIssuer
|
||||||
asserts:
|
asserts:
|
||||||
|
- exists:
|
||||||
|
path: spec.template.metadata.annotations["checksum/secret-athens-proxy-unittest-tls"]
|
||||||
|
template: templates/deployment.yaml
|
||||||
|
- contains:
|
||||||
|
path: spec.template.spec.containers[0].env
|
||||||
|
content:
|
||||||
|
name: ATHENS_TLSCERT_FILE
|
||||||
|
value: /etc/athens-proxy/tls/tls.crt
|
||||||
|
template: templates/deployment.yaml
|
||||||
|
- contains:
|
||||||
|
path: spec.template.spec.containers[0].env
|
||||||
|
content:
|
||||||
|
name: ATHENS_TLSKEY_FILE
|
||||||
|
value: /etc/athens-proxy/tls/tls.key
|
||||||
|
template: templates/deployment.yaml
|
||||||
|
- contains:
|
||||||
|
path: spec.template.spec.containers[0].volumeMounts
|
||||||
|
content:
|
||||||
|
name: tls
|
||||||
|
mountPath: /etc/athens-proxy/tls
|
||||||
|
template: templates/deployment.yaml
|
||||||
|
- contains:
|
||||||
|
path: spec.template.spec.volumes
|
||||||
|
content:
|
||||||
|
name: tls
|
||||||
|
secret:
|
||||||
|
secretName: athens-proxy-unittest-tls
|
||||||
|
template: templates/deployment.yaml
|
||||||
|
|
||||||
|
- it: Rendering with external TLS config
|
||||||
|
set:
|
||||||
|
certificate.enabled: true
|
||||||
|
certificate.existingSecret.enabled: true
|
||||||
|
certificate.existingSecret.secretName: my-own-secret
|
||||||
|
asserts:
|
||||||
|
- exists:
|
||||||
|
path: spec.template.metadata.annotations["checksum/secret-my-own-secret"]
|
||||||
|
template: templates/deployment.yaml
|
||||||
- contains:
|
- contains:
|
||||||
path: spec.template.spec.containers[0].env
|
path: spec.template.spec.containers[0].env
|
||||||
content:
|
content:
|
||||||
|
|||||||
Reference in New Issue
Block a user