Skip to content

Commit 5568579

Browse files
authored
Merge pull request #109 from Leaseweb/selective-components
HelmCharts: Having control on disable and disabling components separately.
2 parents 41b72a8 + 546ae62 commit 5568579

9 files changed

Lines changed: 26 additions & 7 deletions

File tree

charts/cloudstack-csi/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: cloudstack-csi
33
description: A Helm chart for Kubernetes
44
type: application
5-
version: 1.0.2
5+
version: 1.0.3
66
appVersion: 0.4.1
77
sources:
88
- https://github.com/Leaseweb/cloudstack-csi-driver

charts/cloudstack-csi/templates/csi-clusterrole.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{ if .Values.controller.enabled }}
12
{{ if .Values.rbac.create }}
23
# This YAML file contains Cluster Role objects,
34
# which are necessary to run cloudstack-csi-controller
@@ -105,4 +106,5 @@ rules:
105106
resources: [leases]
106107
verbs: ["get", "watch", "list", "delete", "update", "create"]
107108
{{- end}}
109+
{{- end}}
108110
{{- end}}

charts/cloudstack-csi/templates/csi-clusterrolebinding.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{ if .Values.controller.enabled }}
12
{{ if .Values.rbac.create }}
23
# This YAML file contains Cluster Role Binding objects,
34
# which are necessary to run cloudstack-csi-controller
@@ -52,4 +53,5 @@ roleRef:
5253
kind: ClusterRole
5354
name: csi-resizer-role
5455
apiGroup: rbac.authorization.k8s.io
56+
{{- end}}
5557
{{- end}}

charts/cloudstack-csi/templates/csi-controller-deploy.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{ if .Values.controller.enabled }}
12
{{ $enableLeaderElection := gt (int .Values.controller.replicaCount) 1 }}
23

34
apiVersion: apps/v1
@@ -212,4 +213,5 @@ spec:
212213
{{- with .Values.imagePullSecrets }}
213214
imagePullSecrets:
214215
{{- toYaml . | nindent 8 }}
215-
{{- end }}
216+
{{- end }}
217+
{{- end }}

charts/cloudstack-csi/templates/csi-driver.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{- if or (.Values.controller.enabled) (.Values.node.enabled) }}
12
apiVersion: storage.k8s.io/v1
23
kind: CSIDriver
34
metadata:
@@ -12,3 +13,4 @@ spec:
1213
# Supports only persistent volumes.
1314
volumeLifecycleModes:
1415
- Persistent
16+
{{- end }}

charts/cloudstack-csi/templates/csi-node-ds.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{ if .Values.node.enabled }}
12
---
23
apiVersion: apps/v1
34
kind: DaemonSet
@@ -177,4 +178,5 @@ spec:
177178
{{- with .Values.imagePullSecrets }}
178179
imagePullSecrets:
179180
{{- toYaml . | nindent 8 }}
180-
{{- end }}
181+
{{- end }}
182+
{{- end }}

charts/cloudstack-csi/templates/syncer-job.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
2+
{{ if .Values.syncer.enabled }}
13
---
24
apiVersion: batch/v1
35
kind: Job
@@ -46,4 +48,5 @@ spec:
4648
{{- end }}
4749
affinity: {{ toYaml .Values.syncer.affinity | nindent 8 }}
4850
nodeSelector: {{ toYaml .Values.syncer.nodeSelector | nindent 8 }}
49-
restartPolicy: {{ .Values.syncer.restartPolicy }}
51+
restartPolicy: {{ .Values.syncer.restartPolicy }}
52+
{{- end }}

charts/cloudstack-csi/templates/syncer-rbac.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{ if .Values.syncer.enabled }}
12
{{ if .Values.syncer.rbac.create }}
23
---
34
apiVersion: v1
@@ -39,4 +40,5 @@ roleRef:
3940
kind: ClusterRole
4041
name: csi-sc-syncer-role
4142
apiGroup: rbac.authorization.k8s.io
43+
{{- end }}
4244
{{- end }}

charts/cloudstack-csi/values.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ podMonitor:
1818

1919
## CloudStack CSI Controller Defaults
2020
controller:
21+
enabled: true
2122
attacher:
2223
image:
2324
repository: registry.k8s.io/sig-storage/csi-attacher
@@ -44,7 +45,7 @@ controller:
4445
image:
4546
repository: ghcr.io/leaseweb/cloudstack-csi-driver
4647
pullPolicy: IfNotPresent
47-
tag: 0.3.0 # defaults to .Chart.AppVersion
48+
# tag: 0.4.1 # defaults to .Chart.AppVersion
4849
volumeMounts:
4950
- name: cacert
5051
mountPath: /etc/cacert
@@ -93,6 +94,7 @@ controller:
9394

9495
## CloudStack CSI Node Defaults
9596
node:
97+
enabled: true
9698
nodeDriverRegistrar:
9799
image:
98100
repository: registry.k8s.io/sig-storage/csi-node-driver-registrar
@@ -104,7 +106,7 @@ node:
104106
image:
105107
repository: ghcr.io/leaseweb/cloudstack-csi-driver
106108
pullPolicy: IfNotPresent
107-
tag: 0.3.0 # defaults to .Chart.AppVersion
109+
# tag: 0.4.1 # defaults to .Chart.AppVersion
108110
resources: {}
109111
extraArgs: {}
110112
volumeMounts:
@@ -115,6 +117,7 @@ node:
115117
- name: cacert
116118
hostPath:
117119
path: /etc/cacert
120+
dnsPolicy: ClusterFirstWithHostNet
118121

119122
podSecurityContext: {}
120123

@@ -142,10 +145,11 @@ node:
142145

143146
## CloudStack Storage Class Synecr Job Defaults
144147
syncer:
148+
enabled: true
145149
# Job image
146150
image:
147151
repository: "ghcr.io/leaseweb/cloudstack-csi-sc-syncer"
148-
tag: "0.3.0" # defaults to .Chart.AppVersion
152+
# tag: "0.4.1" # defaults to .Chart.AppVersion
149153
imagePullPolicy: IfNotPresent
150154

151155
extraArgs: {}

0 commit comments

Comments
 (0)