Skip to content

Commit

Permalink
Config file for bitnami/nginx in UI (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
alfespa17 authored Feb 25, 2023
1 parent 04ebc7c commit a0ce7ca
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/terrakube/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 2.3.0
version: 2.3.1

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
12 changes: 12 additions & 0 deletions charts/terrakube/templates/deployment-ui.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ spec:
containers:
- name: terrakube-ui
image: azbuilder/terrakube-ui:{{ .Values.ui.version }}
volumeMounts:
- name: ui-config
mountPath: "/app/env-config.js"
subPath: "env-config.js"
readOnly: true
{{- if .Values.ui.resources }}
resources: {{- toYaml .Values.ui.resources | nindent 12 }}
{{- end }}
Expand All @@ -38,4 +43,11 @@ spec:
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
volumes:
- name: ui-config
secret:
secretName: terrakube-ui-secrets
items:
- key: env-config.js
path: env-config.js
{{ end }}
9 changes: 9 additions & 0 deletions charts/terrakube/templates/secrets-ui.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,13 @@ stringData:
REACT_APP_REDIRECT_URI: 'https://{{ .Values.ingress.ui.domain }}'
REACT_APP_REGISTRY_URI: 'https://{{ .Values.ingress.registry.domain }}'
REACT_APP_SCOPE: '{{ .Values.security.dexClientScope }}'
env-config.js: |
window._env_ = {
REACT_APP_TERRAKUBE_API_URL: "https://{{ .Values.ingress.api.domain }}/api/v1/",
REACT_APP_CLIENT_ID: "{{ .Values.security.dexClientId }}",
REACT_APP_AUTHORITY: "{{ .Values.security.dexIssuerUri }}",
REACT_APP_REDIRECT_URI: "https://{{ .Values.ingress.ui.domain }}",
REACT_APP_REGISTRY_URI: "https://{{ .Values.ingress.registry.domain }}",
REACT_APP_SCOPE: "{{ .Values.security.dexClientScope }}",
}
{{ end }}

0 comments on commit a0ce7ca

Please sign in to comment.