diff --git a/charts/cloudstack-csi/Chart.yaml b/charts/cloudstack-csi/Chart.yaml index 380c00f..3a4325a 100644 --- a/charts/cloudstack-csi/Chart.yaml +++ b/charts/cloudstack-csi/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: cloudstack-csi description: A Helm chart for Kubernetes type: application -version: 1.0.2 +version: 1.0.3 appVersion: 0.4.1 sources: - https://github.com/Leaseweb/cloudstack-csi-driver diff --git a/charts/cloudstack-csi/templates/csi-clusterrole.yaml b/charts/cloudstack-csi/templates/csi-clusterrole.yaml index b234dcd..e691846 100644 --- a/charts/cloudstack-csi/templates/csi-clusterrole.yaml +++ b/charts/cloudstack-csi/templates/csi-clusterrole.yaml @@ -1,3 +1,4 @@ +{{ if .Values.controller.enabled }} {{ if .Values.rbac.create }} # This YAML file contains Cluster Role objects, # which are necessary to run cloudstack-csi-controller @@ -105,4 +106,5 @@ rules: resources: [leases] verbs: ["get", "watch", "list", "delete", "update", "create"] {{- end}} +{{- end}} {{- end}} \ No newline at end of file diff --git a/charts/cloudstack-csi/templates/csi-clusterrolebinding.yaml b/charts/cloudstack-csi/templates/csi-clusterrolebinding.yaml index 03b068f..4420bc8 100644 --- a/charts/cloudstack-csi/templates/csi-clusterrolebinding.yaml +++ b/charts/cloudstack-csi/templates/csi-clusterrolebinding.yaml @@ -1,3 +1,4 @@ +{{ if .Values.controller.enabled }} {{ if .Values.rbac.create }} # This YAML file contains Cluster Role Binding objects, # which are necessary to run cloudstack-csi-controller @@ -52,4 +53,5 @@ roleRef: kind: ClusterRole name: csi-resizer-role apiGroup: rbac.authorization.k8s.io +{{- end}} {{- end}} \ No newline at end of file diff --git a/charts/cloudstack-csi/templates/csi-controller-deploy.yaml b/charts/cloudstack-csi/templates/csi-controller-deploy.yaml index f9d96a1..c525664 100644 --- a/charts/cloudstack-csi/templates/csi-controller-deploy.yaml +++ b/charts/cloudstack-csi/templates/csi-controller-deploy.yaml @@ -1,3 +1,4 @@ +{{ if .Values.controller.enabled }} {{ $enableLeaderElection := gt (int .Values.controller.replicaCount) 1 }} apiVersion: apps/v1 @@ -212,4 +213,5 @@ spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} - {{- end }} \ No newline at end of file + {{- end }} +{{- end }} \ No newline at end of file diff --git a/charts/cloudstack-csi/templates/csi-driver.yaml b/charts/cloudstack-csi/templates/csi-driver.yaml index 9dbc49f..323eaa5 100644 --- a/charts/cloudstack-csi/templates/csi-driver.yaml +++ b/charts/cloudstack-csi/templates/csi-driver.yaml @@ -1,3 +1,4 @@ +{{- if or (.Values.controller.enabled) (.Values.node.enabled) }} apiVersion: storage.k8s.io/v1 kind: CSIDriver metadata: @@ -12,3 +13,4 @@ spec: # Supports only persistent volumes. volumeLifecycleModes: - Persistent +{{- end }} diff --git a/charts/cloudstack-csi/templates/csi-node-ds.yaml b/charts/cloudstack-csi/templates/csi-node-ds.yaml index a5b453e..70c2d84 100644 --- a/charts/cloudstack-csi/templates/csi-node-ds.yaml +++ b/charts/cloudstack-csi/templates/csi-node-ds.yaml @@ -1,3 +1,4 @@ +{{ if .Values.node.enabled }} --- apiVersion: apps/v1 kind: DaemonSet @@ -177,4 +178,5 @@ spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} - {{- end }} \ No newline at end of file + {{- end }} +{{- end }} \ No newline at end of file diff --git a/charts/cloudstack-csi/templates/syncer-job.yaml b/charts/cloudstack-csi/templates/syncer-job.yaml index a264b02..0009b95 100644 --- a/charts/cloudstack-csi/templates/syncer-job.yaml +++ b/charts/cloudstack-csi/templates/syncer-job.yaml @@ -1,3 +1,5 @@ + +{{ if .Values.syncer.enabled }} --- apiVersion: batch/v1 kind: Job @@ -46,4 +48,5 @@ spec: {{- end }} affinity: {{ toYaml .Values.syncer.affinity | nindent 8 }} nodeSelector: {{ toYaml .Values.syncer.nodeSelector | nindent 8 }} - restartPolicy: {{ .Values.syncer.restartPolicy }} \ No newline at end of file + restartPolicy: {{ .Values.syncer.restartPolicy }} +{{- end }} \ No newline at end of file diff --git a/charts/cloudstack-csi/templates/syncer-rbac.yaml b/charts/cloudstack-csi/templates/syncer-rbac.yaml index 9d12df2..a9b534d 100644 --- a/charts/cloudstack-csi/templates/syncer-rbac.yaml +++ b/charts/cloudstack-csi/templates/syncer-rbac.yaml @@ -1,3 +1,4 @@ +{{ if .Values.syncer.enabled }} {{ if .Values.syncer.rbac.create }} --- apiVersion: v1 @@ -39,4 +40,5 @@ roleRef: kind: ClusterRole name: csi-sc-syncer-role apiGroup: rbac.authorization.k8s.io +{{- end }} {{- end }} \ No newline at end of file diff --git a/charts/cloudstack-csi/values.yaml b/charts/cloudstack-csi/values.yaml index 07db1ec..49b73d8 100644 --- a/charts/cloudstack-csi/values.yaml +++ b/charts/cloudstack-csi/values.yaml @@ -18,6 +18,7 @@ podMonitor: ## CloudStack CSI Controller Defaults controller: + enabled: true attacher: image: repository: registry.k8s.io/sig-storage/csi-attacher @@ -44,7 +45,7 @@ controller: image: repository: ghcr.io/leaseweb/cloudstack-csi-driver pullPolicy: IfNotPresent - tag: 0.3.0 # defaults to .Chart.AppVersion + # tag: 0.4.1 # defaults to .Chart.AppVersion volumeMounts: - name: cacert mountPath: /etc/cacert @@ -93,6 +94,7 @@ controller: ## CloudStack CSI Node Defaults node: + enabled: true nodeDriverRegistrar: image: repository: registry.k8s.io/sig-storage/csi-node-driver-registrar @@ -104,7 +106,7 @@ node: image: repository: ghcr.io/leaseweb/cloudstack-csi-driver pullPolicy: IfNotPresent - tag: 0.3.0 # defaults to .Chart.AppVersion + # tag: 0.4.1 # defaults to .Chart.AppVersion resources: {} extraArgs: {} volumeMounts: @@ -115,6 +117,7 @@ node: - name: cacert hostPath: path: /etc/cacert + dnsPolicy: ClusterFirstWithHostNet podSecurityContext: {} @@ -142,10 +145,11 @@ node: ## CloudStack Storage Class Synecr Job Defaults syncer: + enabled: true # Job image image: repository: "ghcr.io/leaseweb/cloudstack-csi-sc-syncer" - tag: "0.3.0" # defaults to .Chart.AppVersion + # tag: "0.4.1" # defaults to .Chart.AppVersion imagePullPolicy: IfNotPresent extraArgs: {}