Skip to content

Commit

Permalink
Adjusted deployment for webapp.
Browse files Browse the repository at this point in the history
Co-authored-by: Ciaran Sweet <[email protected]>
  • Loading branch information
pantierra and ciaransweet committed Oct 28, 2024
1 parent 7ec68a2 commit 43528e2
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
11 changes: 11 additions & 0 deletions deployment/helm/webapp-polder/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "polder.fullname" . }}-configmap
data:
app_config.js: |
window.__APP_CONFIG__ = {
MAPBOX_TOKEN: "{{ .Values.mapboxToken }}",
STAC_API: "{{ .Values.stacApi }}",
TILER_API: "{{ .Values.tilerApi }}",
};
6 changes: 6 additions & 0 deletions deployment/helm/webapp-polder/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,16 @@ spec:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.volumeMounts }}
volumeMounts:
- name: {{ include "polder.fullname" . }}-config
mountPath: /usr/share/nginx/html/app_config.js
subPath: app_config.js
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.volumes }}
volumes:
- name: {{ include "polder.fullname" . }}-config
configMap:
name: {{ include "polder.fullname" . }}-configmap
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.nodeSelector }}
Expand Down
7 changes: 6 additions & 1 deletion deployment/helm/webapp-polder/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ serviceAccount:
name: ""

# This is for setting Kubernetes Annotations to a Pod.
# For more information checkout: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
# For more information checkout: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
podAnnotations: {}
# This is for setting Kubernetes Labels to a Pod.
# For more information checkout: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
Expand Down Expand Up @@ -121,3 +121,8 @@ nodeSelector: {}
tolerations: []

affinity: {}

# polder custom configuration
mapboxToken: "token"
stacApi: "http://localhost:8080"
tilerApi: "http://localhost:8081"

0 comments on commit 43528e2

Please sign in to comment.