Skip to content

Commit 703b9b7

Browse files
authored
Merge pull request #15 from developmentseed/feature/some-more-helm-deployment
Review of webapp helm charts
2 parents 1d51416 + fea9f62 commit 703b9b7

File tree

3 files changed

+25
-3
lines changed

3 files changed

+25
-3
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
apiVersion: v1
2+
kind: ConfigMap
3+
metadata:
4+
name: {{ include "webapp-polder.fullname" . }}-configmap
5+
data:
6+
app_config.js: |
7+
window.__APP_CONFIG__ = {
8+
MAPBOX_TOKEN: "{{ .Values.mapboxToken }}",
9+
STAC_API: "{{ .Values.stacApi }}",
10+
TILER_API: "{{ .Values.tilerApi }}",
11+
};

deployment/helm/webapp-polder/templates/deployment.yaml

+8-2
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,20 @@ spec:
4646
{{- toYaml .Values.readinessProbe | nindent 12 }}
4747
resources:
4848
{{- toYaml .Values.resources | nindent 12 }}
49-
{{- with .Values.volumeMounts }}
5049
volumeMounts:
50+
{{- with .Values.volumeMounts }}
5151
{{- toYaml . | nindent 12 }}
5252
{{- end }}
53-
{{- with .Values.volumes }}
53+
- name: {{ include "webapp-polder.fullname" . }}-config
54+
mountPath: /usr/share/nginx/html/app_config.js
55+
subPath: app_config.js
5456
volumes:
57+
{{- with .Values.volumes }}
5558
{{- toYaml . | nindent 8 }}
5659
{{- end }}
60+
- name: {{ include "webapp-polder.fullname" . }}-config
61+
configMap:
62+
name: {{ include "webapp-polder.fullname" . }}-configmap
5763
{{- with .Values.nodeSelector }}
5864
nodeSelector:
5965
{{- toYaml . | nindent 8 }}

deployment/helm/webapp-polder/values.yaml

+6-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ serviceAccount:
3232
name: ""
3333

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

123123
affinity: {}
124+
125+
# polder custom configuration
126+
mapboxToken: "token"
127+
stacApi: "http://localhost:8080"
128+
tilerApi: "http://localhost:8081"

0 commit comments

Comments
 (0)