Skip to content

Commit

Permalink
charts: update volumesnapshot related fields
Browse files Browse the repository at this point in the history
    - rbac: we need capability to operate volumesnapshot
    - controller: add snapshotter
    - misc cleanup

Signed-off-by: Vicente Cheng <[email protected]>
  • Loading branch information
Vicente-Cheng committed Sep 19, 2024
1 parent 06946d0 commit ef8a7b6
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 8 deletions.
2 changes: 1 addition & 1 deletion charts/harvester-csi-driver-lvm/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.1.1
version: 0.1.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
8 changes: 8 additions & 0 deletions charts/harvester-csi-driver-lvm/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@
{{- end -}}
{{- end -}}

{{- define "externalImages.csiSnapshotter" -}}
{{- if .Values.customCSISidecars.enabled -}}
{{- print .Values.customCSISidecars.snapshotter -}}
{{- else -}}
{{- print "registry.k8s.io/sig-storage/csi-snapshotter:v6.3.4" -}}
{{- end -}}
{{- end -}}

{{- define "externalImages.csiNodeDriverRegistrar" -}}
{{- if .Values.customCSISidecars.enabled -}}
{{- print .Values.customCSISidecars.registrar -}}
Expand Down
11 changes: 11 additions & 0 deletions charts/harvester-csi-driver-lvm/templates/controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,17 @@ spec:
volumeMounts:
- mountPath: /csi
name: socket-dir
- name: csi-snapshotter
image: {{ template "externalImages.csiSnapshotter" . }}
imagePullPolicy: IfNotPresent
args:
- -v=5
- -csi-address=/csi/csi.sock
securityContext:
privileged: true
volumeMounts:
- mountPath: /csi
name: socket-dir
volumes:
- hostPath:
path: {{ .Values.kubernetes.kubeletPath }}/plugins/{{ .Values.lvm.driverName }}
Expand Down
4 changes: 2 additions & 2 deletions charts/harvester-csi-driver-lvm/templates/csi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ spec:
resources: {}
securityContext:
privileged: true
terminationMessagePath: /dev/termination-log
terminationMessagePath: /termination.log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /csi
Expand Down Expand Up @@ -115,7 +115,7 @@ spec:
image: {{ template "externalImages.csiLivenessprobe" . }}
imagePullPolicy: IfNotPresent
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePath: /termination.log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /csi
Expand Down
3 changes: 3 additions & 0 deletions charts/harvester-csi-driver-lvm/templates/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ rules:
- apiGroups: ["storage.k8s.io"]
resources: ["volumeattachments/status"]
verbs: ["patch"]
- apiGroups: ["snapshot.storage.k8s.io"]
resources: ["volumesnapshotclasses", "volumesnapshots", "volumesnapshotcontents", "volumesnapshotcontents/status"]
verbs: ["*"]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
Expand Down
11 changes: 6 additions & 5 deletions charts/harvester-csi-driver-lvm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,12 @@ customCSISidecars:

## uncomment and set these if enabled=true

# attacher: k8s.gcr.io/sig-storage/csi-attacher:v3.5.0
# livenessprobe: k8s.gcr.io/sig-storage/livenessprobe:v2.7.0
# provisioner: k8s.gcr.io/sig-storage/csi-provisioner:v3.2.1
# registrar: k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.5.1
# resizer: k8s.gcr.io/sig-storage/csi-resizer:v1.6.0
# attacher: registry.k8s.io/sig-storage/csi-attacher:v4.4.2
# livenessprobe: registry.k8s.io/sig-storage/livenessprobe:v2.12.0
# provisioner: registry.k8s.io/sig-storage/csi-provisioner:v3.6.2
# registrar: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.9.2
# resizer: registry.k8s.io/sig-storage/csi-resizer:v1.9.2
# snapshotter: registry.k8s.io/sig-storage/csi-snapshotter:v6.3.4

nodeSelector:
# The plugin daemonset will run on all nodes if it has a toleration,
Expand Down

0 comments on commit ef8a7b6

Please sign in to comment.