File tree Expand file tree Collapse file tree 3 files changed +21
-1
lines changed
release/cluster/helm/templates Expand file tree Collapse file tree 3 files changed +21
-1
lines changed Original file line number Diff line number Diff line change 1616 listenIP: "0.0.0.0"
1717 listenPort: {{ .Values.service.webPort }}
1818 jwt:
19- secretKey: "polarismesh@2021 "
19+ secretKey: "${JWT_KEY} "
2020 expired: 1800
2121 namingV1URL: "/naming/v1"
2222 namingV2URL: "/naming/v2"
Original file line number Diff line number Diff line change 8686 - mountPath : /root/polaris-console.yaml
8787 name : polaris-console-config
8888 subPath : polaris-console.yaml
89+ env :
90+ - name : JWT_KEY
91+ valueFrom :
92+ secretKeyRef :
93+ name : {{ .Release.Name }}
94+ key : JWT_KEY
8995 restartPolicy : Always
9096 volumes :
9197 - configMap :
Original file line number Diff line number Diff line change 1+ apiVersion : v1
2+ kind : Secret
3+ metadata :
4+ name : {{ .Release.Name }}
5+ type : Opaque
6+ data :
7+ {{- $existingSecret := lookup "v1" "Secret" .Release.Namespace .Release.Name }}
8+ {{- if $existingSecret }}
9+ # 复用已存在的值
10+ JWT_KEY : {{ index $existingSecret.data "JWT_KEY" }}
11+ {{- else }}
12+ # 生成新随机值
13+ JWT_KEY : {{ randAlphaNum 16 | b64enc | quote }}
14+ {{- end }}
You can’t perform that action at this time.
0 commit comments