mirror of
https://github.com/umap-project/umap.git
synced 2025-04-28 19:42:36 +02:00
feat: allow configuring env and conf using existing secret
useful for when the secret is created out of band using a vault api for example
This commit is contained in:
parent
3b9a0c0951
commit
e97b619da8
4 changed files with 21 additions and 2 deletions
|
@ -66,7 +66,11 @@ spec:
|
||||||
{{- end }}
|
{{- end }}
|
||||||
envFrom:
|
envFrom:
|
||||||
- secretRef:
|
- secretRef:
|
||||||
|
{{- if .Values.umap.envFromSecret }}
|
||||||
|
name: {{ .Values.umap.envFromSecret }}
|
||||||
|
{{- else }}
|
||||||
name: {{ include "umap.fullname" . }}-env
|
name: {{ include "umap.fullname" . }}-env
|
||||||
|
{{- end }}
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: config
|
- name: config
|
||||||
mountPath: /etc/umap/
|
mountPath: /etc/umap/
|
||||||
|
@ -80,7 +84,11 @@ spec:
|
||||||
volumes:
|
volumes:
|
||||||
- name: config
|
- name: config
|
||||||
secret:
|
secret:
|
||||||
|
{{- if .Values.umap.configFromSecret }}
|
||||||
|
secretName: {{ .Values.umap.configFromSecret }}
|
||||||
|
{{- else }}
|
||||||
secretName: {{ include "umap.fullname" . }}-config
|
secretName: {{ include "umap.fullname" . }}-config
|
||||||
|
{{- end }}
|
||||||
- name: statics
|
- name: statics
|
||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
{{- if .Values.persistence.enabled }}
|
{{- if .Values.persistence.enabled }}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
{{ if not .Values.umap.configFromSecret }}
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Secret
|
kind: Secret
|
||||||
metadata:
|
metadata:
|
||||||
|
@ -7,3 +8,4 @@ metadata:
|
||||||
type: Opaque
|
type: Opaque
|
||||||
data:
|
data:
|
||||||
umap.conf: {{ .Values.umap.config | b64enc }}
|
umap.conf: {{ .Values.umap.config | b64enc }}
|
||||||
|
{{- end }}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
{{ if not .Values.umap.envFromSecret }}
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Secret
|
kind: Secret
|
||||||
metadata:
|
metadata:
|
||||||
|
@ -9,3 +10,4 @@ data:
|
||||||
{{- range $key, $value := .Values.umap.environment }}
|
{{- range $key, $value := .Values.umap.environment }}
|
||||||
{{ $key }}: "{{ $value | b64enc }}"
|
{{ $key }}: "{{ $value | b64enc }}"
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
|
@ -77,11 +77,18 @@ umap:
|
||||||
SECRET_KEY: CHANGE_ME
|
SECRET_KEY: CHANGE_ME
|
||||||
STATIC_ROOT: /srv/umap/static
|
STATIC_ROOT: /srv/umap/static
|
||||||
MEDIA_ROOT: /srv/umap/uploads
|
MEDIA_ROOT: /srv/umap/uploads
|
||||||
|
# Configure environment variables using an existing secret in the same namespace.
|
||||||
|
# In this case the values above are not used
|
||||||
|
envFromSecret: null
|
||||||
|
|
||||||
# You can also provide umap.conf content here:
|
# You can also provide umap.conf content here:
|
||||||
config: |
|
config: |
|
||||||
from umap.settings.base import *
|
from umap.settings.base import *
|
||||||
|
|
||||||
# See: https://github.com/umap-project/umap/blob/master/umap/settings/local.py.sample
|
# See: https://github.com/umap-project/umap/blob/master/umap/settings/local.py.sample
|
||||||
|
# Configure config file using an existing secret in the same namespace.
|
||||||
|
# In this case the values above are not used
|
||||||
|
configFromSecret: null
|
||||||
|
|
||||||
persistence:
|
persistence:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|
Loading…
Reference in a new issue