Skip to content

Commit 8ed2860

Browse files
committed
feat(charts): database configuration optimization of passport and controller
1 parent 1aa6e99 commit 8ed2860

File tree

5 files changed

+23
-29
lines changed

5 files changed

+23
-29
lines changed

charts/controller/templates/_helpers.tpl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,25 +52,25 @@ env:
5252
- name: DRYCC_DEPLOY_HOOK_SECRET_KEY
5353
valueFrom:
5454
secretKeyRef:
55-
name: deploy-hook-key
56-
key: secret-key
55+
name: controller-creds
56+
key: deploy-hook-secret-key
5757
{{- end }}
5858
- name: DRYCC_SECRET_KEY
5959
valueFrom:
6060
secretKeyRef:
61-
name: django-secret-key
62-
key: secret-key
61+
name: controller-creds
62+
key: django-secret-key
6363
- name: DRYCC_BUILDER_KEY
6464
valueFrom:
6565
secretKeyRef:
6666
name: builder-key-auth
6767
key: builder-key
68-
{{- if eq .Values.global.database_location "off-cluster" }}
68+
{{- if (.Values.database_url) }}
6969
- name: DRYCC_DATABASE_URL
7070
valueFrom:
7171
secretKeyRef:
72-
name: database-creds
73-
key: url
72+
name: controller-creds
73+
key: database_url
7474
{{- else if eq .Values.global.database_location "on-cluster" }}
7575
- name: DRYCC_DATABASE_USER
7676
valueFrom:
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
apiVersion: v1
2+
kind: Secret
3+
metadata:
4+
name: controller-creds
5+
labels:
6+
heritage: drycc
7+
annotations:
8+
"helm.sh/hook": pre-install
9+
data:
10+
{{- if (.Values.database_url) }}
11+
database-url: {{ .Values.database_url | b64enc }}
12+
{{- end }}
13+
django-secret-key: {{ randAscii 64 | b64enc }}
14+
deploy-hook-secret-key: {{ randAscii 64 | b64enc }}

charts/controller/templates/controller-secret-django-secret-key.yaml

Lines changed: 0 additions & 11 deletions
This file was deleted.

charts/controller/templates/deploy-hook-secret.yaml

Lines changed: 0 additions & 11 deletions
This file was deleted.

charts/controller/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ app_storage_class: ""
2222
replicas: 1
2323
# Set celery replicas
2424
celery_replicas: 1
25+
# Configuring this will no longer use the built-in database component
26+
database_url: ""
2527

2628
# Any custom controller environment variables
2729
# can be specified as key-value pairs under environment

0 commit comments

Comments
 (0)