Skip to content

Commit e4ec55f

Browse files
authored
[sophora-ugc]: support optional secrets (#158)
* [sophora-ugc]: support optional secrets * [sophora-ugc]: remove default keys + changelog * [sophora-ugc]: changelog
1 parent b471244 commit e4ec55f

File tree

4 files changed

+25
-5
lines changed

4 files changed

+25
-5
lines changed

charts/sophora-ugc/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Changelog
22

3+
## 2.0.7
4+
- All deployment secrets are optional now. You can use `env` in your `values.yaml` instead, or leave it empty.
5+
36
## 2.0.6
47
- Add support for service accounts
58

charts/sophora-ugc/Chart.yaml

Lines changed: 1 addition & 1 deletion
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

Lines changed: 17 additions & 0 deletions
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 }}

charts/sophora-ugc/values.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ authentication:
2929
secret:
3030
server:
3131
name: secret-name
32-
usernameKey: username
33-
passwordKey: password
32+
usernameKey:
33+
passwordKey:
3434
database:
3535
name: secret-name
36-
usernameKey: database-user
37-
passwordKey: database-password
36+
usernameKey:
37+
passwordKey:
3838
binarystore:
3939
name: secret-name
4040
accessKeyKey: binarystore-access-key

0 commit comments

Comments
 (0)