Skip to content

Commit

Permalink
Update fallback env vars in k8s chart (Budibase#10014)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rory-Powell authored Mar 14, 2023
1 parent 06fce04 commit 65ea1b6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 30 deletions.
15 changes: 3 additions & 12 deletions charts/budibase/templates/app-service-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,30 +63,21 @@ spec:
- name: ENABLE_ANALYTICS
value: {{ .Values.globals.enableAnalytics | quote }}
- name: API_ENCRYPTION_KEY
valueFrom:
secretKeyRef:
name: budibase-budibase {{ template "budibase.fullname" . }}
key: apiEncryptionKey
value: {{ .Values.globals.apiEncryptionKey | quote }}
- name: INTERNAL_API_KEY
valueFrom:
secretKeyRef:
name: {{ template "budibase.fullname" . }}
key: internalApiKey
- name: INTERNAL_API_KEY_FALLBACK
valueFrom:
secretKeyRef:
name: {{ template "budibase.fullname" . }}
key: internalApiKeyFallback
value: {{ .Values.globals.internalApiKeyFallback | quote }}
- name: JWT_SECRET
valueFrom:
secretKeyRef:
name: {{ template "budibase.fullname" . }}
key: jwtSecret
- name: JWT_SECRET_FALLBACK
valueFrom:
secretKeyRef:
name: {{ template "budibase.fullname" . }}
key: jwtSecretFallback
value: {{ .Values.globals.jwtSecretFallback | quote }}
{{ if .Values.services.objectStore.region }}
- name: AWS_REGION
value: {{ .Values.services.objectStore.region }}
Expand Down
6 changes: 0 additions & 6 deletions charts/budibase/templates/secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,8 @@ metadata:
heritage: "{{ .Release.Service }}"
type: Opaque
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 }}
{{/* Fallback value auto generated */}}
internalApiKeyFallback: {{ .Values.globals.internalApiKeyFallback }}
jwtSecret: {{ template "budibase.defaultsecret" .Values.globals.jwtSecret }}
{{/* Falback value never auto generated */}}
jwtSecretFallback: {{ .Values.globals.jwtSecretFallback }}
objectStoreAccess: {{ template "budibase.defaultsecret" .Values.services.objectStore.accessKey }}
objectStoreSecret: {{ template "budibase.defaultsecret" .Values.services.objectStore.secretKey }}
{{- end -}}
15 changes: 3 additions & 12 deletions charts/budibase/templates/worker-service-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,30 +63,21 @@ spec:
value: http://{{ .Release.Name }}-svc-couchdb:{{ .Values.services.couchdb.port }}
{{ end }}
- name: API_ENCRYPTION_KEY
valueFrom:
secretKeyRef:
name: budibase-budibase {{ template "budibase.fullname" . }}
key: apiEncryptionKey
value: {{ .Values.globals.apiEncryptionKey | quote }}
- name: INTERNAL_API_KEY
valueFrom:
secretKeyRef:
name: {{ template "budibase.fullname" . }}
key: internalApiKey
- name: INTERNAL_API_KEY_FALLBACK
valueFrom:
secretKeyRef:
name: {{ template "budibase.fullname" . }}
key: internalApiKeyFallback
value: {{ .Values.globals.internalApiKeyFallback | quote }}
- name: JWT_SECRET
valueFrom:
secretKeyRef:
name: {{ template "budibase.fullname" . }}
key: jwtSecret
- name: JWT_SECRET_FALLBACK
valueFrom:
secretKeyRef:
name: {{ template "budibase.fullname" . }}
key: jwtSecretFallback
value: {{ .Values.globals.jwtSecretFallback | quote }}
{{ if .Values.services.objectStore.region }}
- name: AWS_REGION
value: {{ .Values.services.objectStore.region }}
Expand Down

0 comments on commit 65ea1b6

Please sign in to comment.