Update fallback env vars in k8s chart (#10014)

This commit is contained in:
Rory Powell 2023-03-14 09:41:40 +00:00 committed by GitHub
parent 406cecc74c
commit f482dbca8b
3 changed files with 6 additions and 30 deletions

View File

@ -63,30 +63,21 @@ spec:
- name: ENABLE_ANALYTICS - name: ENABLE_ANALYTICS
value: {{ .Values.globals.enableAnalytics | quote }} value: {{ .Values.globals.enableAnalytics | quote }}
- name: API_ENCRYPTION_KEY - name: API_ENCRYPTION_KEY
valueFrom: value: {{ .Values.globals.apiEncryptionKey | quote }}
secretKeyRef:
name: budibase-budibase {{ template "budibase.fullname" . }}
key: apiEncryptionKey
- name: INTERNAL_API_KEY - name: INTERNAL_API_KEY
valueFrom: valueFrom:
secretKeyRef: secretKeyRef:
name: {{ template "budibase.fullname" . }} name: {{ template "budibase.fullname" . }}
key: internalApiKey key: internalApiKey
- name: INTERNAL_API_KEY_FALLBACK - name: INTERNAL_API_KEY_FALLBACK
valueFrom: value: {{ .Values.globals.internalApiKeyFallback | quote }}
secretKeyRef:
name: {{ template "budibase.fullname" . }}
key: internalApiKeyFallback
- name: JWT_SECRET - name: JWT_SECRET
valueFrom: valueFrom:
secretKeyRef: secretKeyRef:
name: {{ template "budibase.fullname" . }} name: {{ template "budibase.fullname" . }}
key: jwtSecret key: jwtSecret
- name: JWT_SECRET_FALLBACK - name: JWT_SECRET_FALLBACK
valueFrom: value: {{ .Values.globals.jwtSecretFallback | quote }}
secretKeyRef:
name: {{ template "budibase.fullname" . }}
key: jwtSecretFallback
{{ if .Values.services.objectStore.region }} {{ if .Values.services.objectStore.region }}
- name: AWS_REGION - name: AWS_REGION
value: {{ .Values.services.objectStore.region }} value: {{ .Values.services.objectStore.region }}

View File

@ -10,14 +10,8 @@ metadata:
heritage: "{{ .Release.Service }}" heritage: "{{ .Release.Service }}"
type: Opaque type: Opaque
data: data:
{{/* For new installations this can be any value. For existing installations this must match the first used jwtSecret */}}
apiEncryptionKey: {{ .Values.globals.apiEncryptionKey }}
internalApiKey: {{ template "budibase.defaultsecret" .Values.globals.internalApiKey }} internalApiKey: {{ template "budibase.defaultsecret" .Values.globals.internalApiKey }}
{{/* Fallback value auto generated */}}
internalApiKeyFallback: {{ .Values.globals.internalApiKeyFallback }}
jwtSecret: {{ template "budibase.defaultsecret" .Values.globals.jwtSecret }} jwtSecret: {{ template "budibase.defaultsecret" .Values.globals.jwtSecret }}
{{/* Falback value never auto generated */}}
jwtSecretFallback: {{ .Values.globals.jwtSecretFallback }}
objectStoreAccess: {{ template "budibase.defaultsecret" .Values.services.objectStore.accessKey }} objectStoreAccess: {{ template "budibase.defaultsecret" .Values.services.objectStore.accessKey }}
objectStoreSecret: {{ template "budibase.defaultsecret" .Values.services.objectStore.secretKey }} objectStoreSecret: {{ template "budibase.defaultsecret" .Values.services.objectStore.secretKey }}
{{- end -}} {{- end -}}

View File

@ -63,30 +63,21 @@ spec:
value: http://{{ .Release.Name }}-svc-couchdb:{{ .Values.services.couchdb.port }} value: http://{{ .Release.Name }}-svc-couchdb:{{ .Values.services.couchdb.port }}
{{ end }} {{ end }}
- name: API_ENCRYPTION_KEY - name: API_ENCRYPTION_KEY
valueFrom: value: {{ .Values.globals.apiEncryptionKey | quote }}
secretKeyRef:
name: budibase-budibase {{ template "budibase.fullname" . }}
key: apiEncryptionKey
- name: INTERNAL_API_KEY - name: INTERNAL_API_KEY
valueFrom: valueFrom:
secretKeyRef: secretKeyRef:
name: {{ template "budibase.fullname" . }} name: {{ template "budibase.fullname" . }}
key: internalApiKey key: internalApiKey
- name: INTERNAL_API_KEY_FALLBACK - name: INTERNAL_API_KEY_FALLBACK
valueFrom: value: {{ .Values.globals.internalApiKeyFallback | quote }}
secretKeyRef:
name: {{ template "budibase.fullname" . }}
key: internalApiKeyFallback
- name: JWT_SECRET - name: JWT_SECRET
valueFrom: valueFrom:
secretKeyRef: secretKeyRef:
name: {{ template "budibase.fullname" . }} name: {{ template "budibase.fullname" . }}
key: jwtSecret key: jwtSecret
- name: JWT_SECRET_FALLBACK - name: JWT_SECRET_FALLBACK
valueFrom: value: {{ .Values.globals.jwtSecretFallback | quote }}
secretKeyRef:
name: {{ template "budibase.fullname" . }}
key: jwtSecretFallback
{{ if .Values.services.objectStore.region }} {{ if .Values.services.objectStore.region }}
- name: AWS_REGION - name: AWS_REGION
value: {{ .Values.services.objectStore.region }} value: {{ .Values.services.objectStore.region }}