Skip to content

Commit

Permalink
Read sftToken from secrets.yaml (#4214)
Browse files Browse the repository at this point in the history
* add sftToken to secrets

* add changelog

* rename to sftTokenSecret

* fix syntax

* add missing sft config in values

* set sftToken only when sftTokenSecret is set in secrets

* remove default sft config in values.yaml
  • Loading branch information
amitsagtani97 authored Aug 23, 2024
1 parent c5c3571 commit 0e57e6b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog.d/5-internal/WPB-10302
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Read sftTokenSecret from secrets.yaml and mount to /etc/wire/brig/secrets/sftTokenSecret by default
4 changes: 2 additions & 2 deletions charts/brig/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -233,11 +233,11 @@ data:
{{- if .sftDiscoveryIntervalSeconds }}
sftDiscoveryIntervalSeconds: {{ .sftDiscoveryIntervalSeconds }}
{{- end }}
{{- if .sftToken }}
{{- if $.Values.secrets.sftTokenSecret }}
sftToken:
{{- with .sftToken }}
ttl: {{ .ttl }}
secret: {{ .secret }}
secret: {{ .secret | default "/etc/wire/brig/secrets/sftTokenSecret" }}
{{- end }}
{{- end }}
{{- end }}
Expand Down
3 changes: 3 additions & 0 deletions charts/brig/templates/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ data:
awsKeyId: {{ .awsKeyId | b64enc | quote }}
awsSecretKey: {{ .awsSecretKey | b64enc | quote }}
{{- end }}
{{- if .sftTokenSecret }}
sftTokenSecret: {{ .sftTokenSecret | b64enc | quote }}
{{- end }}
{{- if (not $.Values.config.useSES) }}
smtp-password.txt: {{ .smtpPassword | b64enc | quote }}
{{- end }}
Expand Down
8 changes: 8 additions & 0 deletions charts/brig/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,14 @@ config:
providerTokenTimeout: 900
legalholdUserTokenTimeout: 4838400
legalholdAccessTokenTimeout: 900
# sft:
# sftBaseDomain: sft.wire.example.com
# sftSRVServiceName: sft
# sftDiscoveryIntervalSeconds: 10
# sftListLength: 20
# sftToken:
# ttl: 120
# secret: /etc/wire/brig/secrets/sftTokenSecret # this is the default path for secret.sftTokenSecret
optSettings:
setActivationTimeout: 1209600
setTeamInvitationTimeout: 1814400
Expand Down

0 comments on commit 0e57e6b

Please sign in to comment.