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 fea9f62
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 3 deletions.
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 "webapp-polder.fullname" . }}-configmap
data:
app_config.js: |
window.__APP_CONFIG__ = {
MAPBOX_TOKEN: "{{ .Values.mapboxToken }}",
STAC_API: "{{ .Values.stacApi }}",
TILER_API: "{{ .Values.tilerApi }}",
};
10 changes: 8 additions & 2 deletions deployment/helm/webapp-polder/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,20 @@ spec:
{{- toYaml .Values.readinessProbe | nindent 12 }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.volumeMounts }}
volumeMounts:
{{- with .Values.volumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.volumes }}
- name: {{ include "webapp-polder.fullname" . }}-config
mountPath: /usr/share/nginx/html/app_config.js
subPath: app_config.js
volumes:
{{- with .Values.volumes }}
{{- toYaml . | nindent 8 }}
{{- end }}
- name: {{ include "webapp-polder.fullname" . }}-config
configMap:
name: {{ include "webapp-polder.fullname" . }}-configmap
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
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 fea9f62

Please sign in to comment.