Skip to content

Commit

Permalink
Helm Fixes for GKE deployment (#963)
Browse files Browse the repository at this point in the history
* Helm Fixes for GKE deployment
 - Make PV and PVC controllable by values.yaml, GKE does not need a VPC. Config for PV and VPC are split up.
 - Added storageClassName to PV and PVC configuration, GKE need it.
 - Deployment, added startupProbe as the downloading and writing of the IRMA schema on the PV cause container creation timeouts.
  • Loading branch information
rolandgroen authored Dec 12, 2022
1 parent f2f9894 commit c0972b0
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 6 deletions.
2 changes: 1 addition & 1 deletion charts/nuts-node/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.0.1
version: 0.0.2

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
6 changes: 6 additions & 0 deletions charts/nuts-node/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ spec:
httpGet:
path: /status
port: http
startupProbe:
httpGet:
path: /status
port: http
failureThreshold: 300
periodSeconds: 10
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
Expand Down
13 changes: 9 additions & 4 deletions charts/nuts-node/templates/nuts-data-pv.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{ if .Values.nuts.data.persistedVolume.enabled }}
apiVersion: v1
kind: PersistentVolume
metadata:
Expand All @@ -8,22 +9,26 @@ metadata:
"helm.sh/resource-policy": keep
spec:
persistentVolumeReclaimPolicy: Retain
storageClassName: ""
storageClassName: {{ .Values.nuts.data.persistedVolume.storageClassName | default "" }}
capacity:
storage: {{ .Values.nuts.data.persistedVolume.capacity | default "100Mi" }}
accessModes: {{ required "Please define `nuts.data.persistedVolume.accessModes` in `values.yaml`" .Values.nuts.data.persistedVolume.accessModes }}
hostPath:
path: {{ .Values.nuts.data.persistedVolume.mountPath | default "/opt/nuts/data" }}
---
{{ end }}
{{ if .Values.nuts.data.persistedVolumeClaim.enabled }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: nuts-data-pvc
annotations:
"helm.sh/resource-policy": keep
spec:
storageClassName: "" # Empty string must be explicitly set otherwise default StorageClass will be set
accessModes: {{ required "Please define `nuts.data.persistedVolume.accessModes` in `values.yaml`" .Values.nuts.data.persistedVolume.accessModes }}
storageClassName: {{ .Values.nuts.data.persistedVolumeClaim.storageClassName | default "" }}
accessModes: {{ required "Please define `nuts.data.persistedVolumeClaim.accessModes` in `values.yaml`" .Values.nuts.data.persistedVolumeClaim.accessModes }}
resources:
requests:
storage: {{ .Values.nuts.data.persistedVolume.capacity | default "100Mi" }}
storage: {{ .Values.nuts.data.persistedVolumeClaim.capacity | default "100Mi" }}
---
{{ end }}
10 changes: 9 additions & 1 deletion charts/nuts-node/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,18 @@ nuts:
# Config for the NUTS data mount inside Kubernetes
data:
persistedVolume:
enabled: true
capacity: 100Mi
mountPath: /opt/nuts/data
accessModes:
- ReadWriteOnce
storageClassName: ""
persistedVolumeClaim:
enabled: true
capacity: 100Mi
storageClassName: ""
accessModes:
- ReadWriteOnce

ssl:
# Every key below will be loaded as a Secret and mounted as a file at /opt/nuts/ssl
Expand Down Expand Up @@ -135,4 +143,4 @@ nuts:
VR0RBBMwEYIPbm9kZS5udXRzLmxvY2FsMAoGCCqGSM49BAMCA0gAMEUCIACXbFuP
tPeduokCmVQAIavaUj2JlTmcIBDHvC6wZihEAiEA0fcogH7MjPrE/6bDaxZtNh0Q
K6QDx9YVt/Mo6MFBgQY=
-----END CERTIFICATE-----
-----END CERTIFICATE-----

0 comments on commit c0972b0

Please sign in to comment.