Skip to content

Commit

Permalink
fix: update helm chart to make the initContainer optional and allow s…
Browse files Browse the repository at this point in the history
…pecifying PVC access mode (#150)

Signed-off-by: Harikrishnan Balagopal <harikrishmenon@gmail.com>
  • Loading branch information
HarikrishnanBalagopal authored Aug 10, 2023
1 parent d2f62f9 commit b85f422
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
labels:
move2kube.konveyor.io/service: "{{ .Release.Name }}-move2kubeapi"
spec:
{{- if .Values.persistentVolumeClaim.enable }}
{{- if and (.Values.deployment.api.initContainer) (.Values.persistentVolumeClaim.enable) }}
initContainers:
- name: change-perms
image: quay.io/konveyor/busybox
Expand Down
6 changes: 5 additions & 1 deletion helm-charts/move2kube/templates/persistent-volume-claim.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@ metadata:
spec:
storageClassName: "{{ .Values.persistentVolumeClaim.storageClassName }}"
accessModes:
{{- if or (gt (int .Values.deployment.api.replicas) 1) (.Values.deployment.database.enable) (.Values.persistentVolumeClaim.readWriteMany) }}
- ReadWriteMany
{{- else }}
- ReadWriteOnce
{{- end }}
volumeMode: Filesystem
resources:
requests:
storage: "{{ .Values.persistentVolumeClaim.storageSize }}"
{{- end }}
{{- end }}
10 changes: 8 additions & 2 deletions helm-charts/move2kube/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@
},
"cpu": {
"type": "string"
}
},
"initContainer": {
"type": "boolean"
}
},
"required": [
"cpu",
Expand Down Expand Up @@ -156,7 +159,10 @@
},
"storageSize": {
"type": "string"
}
},
"readWriteMany": {
"type": "boolean"
}
},
"required": [
"createNew",
Expand Down
2 changes: 2 additions & 0 deletions helm-charts/move2kube/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ deployment:
imageTag: "" # if empty we will use AppVersion from the Chart.yaml as the tag
memory: "1Gi"
cpu: "300m"
initContainer: false
authServer:
enable: false
replicas: 1
Expand All @@ -27,6 +28,7 @@ persistentVolumeClaim:
name: "" # if createNew is false this MUST contain the name of an existing persistent volume claim
storageClassName: ""
storageSize: 1Gi
readWriteMany: true
secret:
api:
enable: false
Expand Down

0 comments on commit b85f422

Please sign in to comment.