Skip to content

Commit

Permalink
Merge pull request #15 from developmentseed/feature/some-more-helm-de…
Browse files Browse the repository at this point in the history
…ployment

Review of webapp helm charts
  • Loading branch information
pantierra authored Oct 29, 2024
2 parents 1d51416 + fea9f62 commit 703b9b7
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 703b9b7

Please sign in to comment.