helm: remove mount of configmap, read entirely from env
This commit is contained in:
parent
aaa662199c
commit
885f8bae9f
|
@ -3,24 +3,17 @@ kind: ConfigMap
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ include "passbook.fullname" . }}-config
|
name: {{ include "passbook.fullname" . }}-config
|
||||||
data:
|
data:
|
||||||
config.yml: |
|
POSTGRESQL__HOST: "{{ .Release.Name }}-postgresql"
|
||||||
postgresql:
|
POSTGRESQL__NAME: "{{ .Values.postgresql.postgresqlDatabase }}"
|
||||||
host: "{{ .Release.Name }}-postgresql"
|
POSTGRESQL__USER: "{{ .Values.postgresql.postgresqlUsername }}"
|
||||||
name: "{{ .Values.postgresql.postgresqlDatabase }}"
|
{{- if .Values.backup }}
|
||||||
user: postgres
|
POSTGRESQL__BACKUP__ACCESS_KEY: "{{ .Values.backup.access_key }}"
|
||||||
{{- if .Values.backup }}
|
POSTGRESQL__BACKUP__SECRET_KEY: "{{ .Values.backup.secret_key }}"
|
||||||
backup:
|
POSTGRESQL__BACKUP__BUCKET: "{{ .Values.backup.bucket }}"
|
||||||
access_key: "{{ .Values.backup.access_key }}"
|
POSTGRESQL__BACKUP__HOST: "{{ .Values.backup.host }}"
|
||||||
secret_key: "{{ .Values.backup.secret_key }}"
|
{{- end}}
|
||||||
bucket: "{{ .Values.backup.bucket }}"
|
REDIS__HOST: "{{ .Release.Name }}-redis-master"
|
||||||
host: "{{ .Values.backup.host }}"
|
ERROR_REPORTING__ENABLED: "{{ .Values.config.error_reporting.enabled }}"
|
||||||
{{- end}}
|
ERROR_REPORTING__ENVIRONMENT: "{{ .Values.config.error_reporting.environment }}"
|
||||||
redis:
|
ERROR_REPORTING__SEND_PII: "{{ .Values.config.error_reporting.send_pii }}"
|
||||||
host: "{{ .Release.Name }}-redis-master"
|
LOG_LEVEL: "{{ .Values.config.log_level }}"
|
||||||
cache_db: 0
|
|
||||||
message_queue_db: 1
|
|
||||||
error_reporting:
|
|
||||||
enabled: {{ .Values.config.error_reporting.enabled }}
|
|
||||||
environment: {{ .Values.config.error_reporting.environment }}
|
|
||||||
send_pii: {{ .Values.config.error_reporting.send_pii }}
|
|
||||||
log_level: "{{ .Values.config.log_level }}"
|
|
||||||
|
|
|
@ -22,10 +22,6 @@ spec:
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
k8s.passbook.io/component: web
|
k8s.passbook.io/component: web
|
||||||
spec:
|
spec:
|
||||||
volumes:
|
|
||||||
- name: config-volume
|
|
||||||
configMap:
|
|
||||||
name: {{ include "passbook.fullname" . }}-config
|
|
||||||
initContainers:
|
initContainers:
|
||||||
- name: passbook-database-migrations
|
- name: passbook-database-migrations
|
||||||
image: "beryju/passbook:{{ .Values.image.tag }}"
|
image: "beryju/passbook:{{ .Values.image.tag }}"
|
||||||
|
@ -33,9 +29,6 @@ spec:
|
||||||
args:
|
args:
|
||||||
- ./manage.py
|
- ./manage.py
|
||||||
- migrate
|
- migrate
|
||||||
volumeMounts:
|
|
||||||
- mountPath: /etc/passbook
|
|
||||||
name: config-volume
|
|
||||||
envFrom:
|
envFrom:
|
||||||
- configMapRef:
|
- configMapRef:
|
||||||
name: {{ include "passbook.fullname" . }}-config
|
name: {{ include "passbook.fullname" . }}-config
|
||||||
|
@ -63,9 +56,6 @@ spec:
|
||||||
args:
|
args:
|
||||||
- uwsgi
|
- uwsgi
|
||||||
- uwsgi.ini
|
- uwsgi.ini
|
||||||
volumeMounts:
|
|
||||||
- mountPath: /etc/passbook
|
|
||||||
name: config-volume
|
|
||||||
envFrom:
|
envFrom:
|
||||||
- configMapRef:
|
- configMapRef:
|
||||||
name: {{ include "passbook.fullname" . }}-config
|
name: {{ include "passbook.fullname" . }}-config
|
||||||
|
@ -74,18 +64,18 @@ spec:
|
||||||
- name: PASSBOOK_SECRET_KEY
|
- name: PASSBOOK_SECRET_KEY
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: {{ include "passbook.fullname" . }}-secret-key
|
name: "{{ include "passbook.fullname" . }}-secret-key"
|
||||||
key: secret_key
|
key: "secret_key"
|
||||||
- name: PASSBOOK_REDIS__PASSWORD
|
- name: PASSBOOK_REDIS__PASSWORD
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: "{{ .Release.Name }}-redis"
|
name: "{{ .Release.Name }}-redis"
|
||||||
key: redis-password
|
key: "redis-password"
|
||||||
- name: PASSBOOK_POSTGRESQL__PASSWORD
|
- name: PASSBOOK_POSTGRESQL__PASSWORD
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: "{{ .Release.Name }}-postgresql"
|
name: "{{ .Release.Name }}-postgresql"
|
||||||
key: postgresql-password
|
key: "postgresql-password"
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
- name: http
|
||||||
containerPort: 8000
|
containerPort: 8000
|
||||||
|
|
|
@ -22,10 +22,6 @@ spec:
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
k8s.passbook.io/component: worker
|
k8s.passbook.io/component: worker
|
||||||
spec:
|
spec:
|
||||||
volumes:
|
|
||||||
- name: config-volume
|
|
||||||
configMap:
|
|
||||||
name: {{ include "passbook.fullname" . }}-config
|
|
||||||
containers:
|
containers:
|
||||||
- name: {{ .Chart.Name }}
|
- name: {{ .Chart.Name }}
|
||||||
image: "beryju/passbook:{{ .Values.image.tag }}"
|
image: "beryju/passbook:{{ .Values.image.tag }}"
|
||||||
|
@ -38,29 +34,26 @@ spec:
|
||||||
- -B
|
- -B
|
||||||
- -A=passbook.root.celery
|
- -A=passbook.root.celery
|
||||||
- -s=/tmp/celerybeat-schedule
|
- -s=/tmp/celerybeat-schedule
|
||||||
volumeMounts:
|
|
||||||
- mountPath: /etc/passbook
|
|
||||||
name: config-volume
|
|
||||||
envFrom:
|
envFrom:
|
||||||
- configMapRef:
|
- configMapRef:
|
||||||
name: {{ include "passbook.fullname" . }}-config
|
name: "{{ include "passbook.fullname" . }}-config"
|
||||||
prefix: PASSBOOK_
|
prefix: "PASSBOOK_"
|
||||||
env:
|
env:
|
||||||
- name: PASSBOOK_SECRET_KEY
|
- name: PASSBOOK_SECRET_KEY
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: {{ include "passbook.fullname" . }}-secret-key
|
name: "{{ include "passbook.fullname" . }}-secret-key"
|
||||||
key: secret_key
|
key: secret_key
|
||||||
- name: PASSBOOK_REDIS__PASSWORD
|
- name: PASSBOOK_REDIS__PASSWORD
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: "{{ .Release.Name }}-redis"
|
name: "{{ .Release.Name }}-redis"
|
||||||
key: redis-password
|
key: "redis-password"
|
||||||
- name: PASSBOOK_POSTGRESQL__PASSWORD
|
- name: PASSBOOK_POSTGRESQL__PASSWORD
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: "{{ .Release.Name }}-postgresql"
|
name: "{{ .Release.Name }}-postgresql"
|
||||||
key: postgresql-password
|
key: "postgresql-password"
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
cpu: 150m
|
cpu: 150m
|
||||||
|
|
Reference in New Issue