While this will now more or less require a local docker login - which can be overridden by setting the image-pull-secrets property - this ensures every deploy has a valid context. One annoying thing is that the secret is per-app vs global, meaning that if the secret must be rotated, all apps need to be redeployed. A future change can fix that by deploying a global secret, or if folks really desire, this can be done by setting the image-pull-secrets property on the app/globally.
23 lines
807 B
YAML
23 lines
807 B
YAML
---
|
|
apiVersion: v1
|
|
kind: Secret
|
|
metadata:
|
|
annotations:
|
|
app.kubernetes.io/version: {{ $.Values.global.deploment_id | quote }}
|
|
dokku.com/managed: "true"
|
|
{{- if and $.Values.global.annotations $.Values.global.annotations.secret }}
|
|
{{- range $k, $v := $.Values.global.annotations.secret }}
|
|
{{ $k }}: {{ $v | quote }}
|
|
{{- end }}
|
|
{{- end }}
|
|
labels:
|
|
app.kubernetes.io/instance: env-{{ $.Values.global.app_name }}.{{ $.Values.global.deploment_id }}
|
|
app.kubernetes.io/name: env-{{ $.Values.global.app_name }}
|
|
app.kubernetes.io/part-of: {{ $.Values.global.app_name }}
|
|
name: env-{{ $.Values.global.app_name }}.{{ $.Values.global.deploment_id }}
|
|
namespace: {{ $.Values.global.namespace }}
|
|
{{- with .Values.global.secrets }}
|
|
data:
|
|
{{- toYaml . | nindent 2 }}
|
|
{{- end }}
|