mirror of
https://github.com/beclab/Olares
synced 2026-05-24 09:18:23 +00:00
fix: do not update random-key when exists (#1846)
This commit is contained in:
parent
fc3284baca
commit
a796c6704a
1 changed files with 9 additions and 1 deletions
|
|
@ -18,6 +18,14 @@
|
|||
{{ $nats_password = randAlphaNum 16 | b64enc }}
|
||||
{{- end -}}
|
||||
|
||||
{{- $app_service_app_key := (lookup "v1" "Secret" $namespace "app-key") -}}
|
||||
{{- $app_key_random := "" -}}
|
||||
{{ if $app_service_app_key -}}
|
||||
{{ $app_key_random = (index $app_service_app_key "data" "random-key") }}
|
||||
{{ else -}}
|
||||
{{ $app_key_random = randAlphaNum 32 | b64enc }}
|
||||
{{- end -}}
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
|
|
@ -314,7 +322,7 @@ metadata:
|
|||
namespace: {{ .Release.Namespace }}
|
||||
type: Opaque
|
||||
data:
|
||||
random-key: {{ randAlphaNum 32 | b64enc }}
|
||||
random-key: {{ $app_key_random }}
|
||||
|
||||
---
|
||||
apiVersion: apr.bytetrade.io/v1alpha1
|
||||
|
|
|
|||
Loading…
Reference in a new issue