Skip to content

Commit 2a518cb

Browse files
committed
[sophora-ugc]: support optional secrets
1 parent b471244 commit 2a518cb

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

charts/sophora-ugc/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 2.0.6
18+
version: 2.0.7
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to

charts/sophora-ugc/templates/deployment.yaml

+17
Original file line numberDiff line numberDiff line change
@@ -39,36 +39,53 @@ spec:
3939
env:
4040
- name: JAVA_TOOL_OPTIONS
4141
value: {{ .Values.javaOptions }}
42+
{{- if .Values.authentication.secret.server.usernameKey }}
4243
- name: SOPHORA-SERVER_USERNAME
4344
valueFrom:
4445
secretKeyRef:
4546
key: {{ .Values.authentication.secret.server.usernameKey }}
4647
name: {{ .Values.authentication.secret.server.name }}
48+
optional: true
49+
{{- end }}
50+
{{- if .Values.authentication.secret.server.passwordKey }}
4751
- name: SOPHORA-SERVER_PASSWORD
4852
valueFrom:
4953
secretKeyRef:
5054
key: {{ .Values.authentication.secret.server.passwordKey }}
5155
name: {{ .Values.authentication.secret.server.name }}
56+
optional: true
57+
{{- end }}
58+
{{- if .Values.authentication.secret.database.usernameKey }}
5259
- name: DATABASE_USER
5360
valueFrom:
5461
secretKeyRef:
5562
key: {{ .Values.authentication.secret.database.usernameKey }}
5663
name: {{ .Values.authentication.secret.database.name }}
64+
optional: true
65+
{{- end }}
66+
{{- if .Values.authentication.secret.database.passwordKey }}
5767
- name: DATABASE_PASSWORD
5868
valueFrom:
5969
secretKeyRef:
6070
key: {{ .Values.authentication.secret.database.passwordKey }}
6171
name: {{ .Values.authentication.secret.database.name }}
72+
optional: true
73+
{{- end }}
74+
{{- if .Values.authentication.secret.s3bucket.accessKeyKey }}
6275
- name: SUBMISSIONS_S3_ACCESSKEYID
6376
valueFrom:
6477
secretKeyRef:
6578
key: {{ .Values.authentication.secret.s3bucket.accessKeyKey }}
6679
name: {{ .Values.authentication.secret.s3bucket.name }}
80+
optional: true
81+
{{- end }}
82+
{{- if .Values.authentication.secret.s3bucket.secretIdKey }}
6783
- name: SUBMISSIONS_S3_SECRETACCESSKEY
6884
valueFrom:
6985
secretKeyRef:
7086
key: {{ .Values.authentication.secret.s3bucket.secretIdKey }}
7187
name: {{ .Values.authentication.secret.s3bucket.name }}
88+
{{- end }}
7289
{{ if .Values.env -}}
7390
{{- toYaml .Values.env | nindent 12 }}
7491
{{- end }}

0 commit comments

Comments
 (0)