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 20fb1b6
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 5 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
11 changes: 8 additions & 3 deletions deployment/helm/webapp-polder/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ image:
# This is for the secretes for pulling an image from a private repository more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
imagePullSecrets: []
# This is to override the chart name.
nameOverride: ""
fullnameOverride: ""
nameOverride: "webapp-polder"
fullnameOverride: "test-webapp-polder"

#This section builds out the service account more information can be found here: https://kubernetes.io/docs/concepts/security/service-accounts/
serviceAccount:
Expand All @@ -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 20fb1b6

Please sign in to comment.