Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HelmCharts: Having control on disable and disabling components separately. #109

Merged
merged 4 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/cloudstack-csi/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions charts/cloudstack-csi/templates/csi-clusterrole.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -105,4 +106,5 @@ rules:
resources: [leases]
verbs: ["get", "watch", "list", "delete", "update", "create"]
{{- end}}
{{- end}}
{{- end}}
2 changes: 2 additions & 0 deletions charts/cloudstack-csi/templates/csi-clusterrolebinding.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -52,4 +53,5 @@ roleRef:
kind: ClusterRole
name: csi-resizer-role
apiGroup: rbac.authorization.k8s.io
{{- end}}
{{- end}}
4 changes: 3 additions & 1 deletion charts/cloudstack-csi/templates/csi-controller-deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{ if .Values.controller.enabled }}
{{ $enableLeaderElection := gt (int .Values.controller.replicaCount) 1 }}

apiVersion: apps/v1
Expand Down Expand Up @@ -212,4 +213,5 @@ spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- end }}
2 changes: 2 additions & 0 deletions charts/cloudstack-csi/templates/csi-driver.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if or (.Values.controller.enabled) (.Values.node.enabled) }}
apiVersion: storage.k8s.io/v1
kind: CSIDriver
metadata:
Expand All @@ -12,3 +13,4 @@ spec:
# Supports only persistent volumes.
volumeLifecycleModes:
- Persistent
{{- end }}
4 changes: 3 additions & 1 deletion charts/cloudstack-csi/templates/csi-node-ds.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{ if .Values.node.enabled }}
---
apiVersion: apps/v1
kind: DaemonSet
Expand Down Expand Up @@ -177,4 +178,5 @@ spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- end }}
5 changes: 4 additions & 1 deletion charts/cloudstack-csi/templates/syncer-job.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@

{{ if .Values.syncer.enabled }}
---
apiVersion: batch/v1
kind: Job
Expand Down Expand Up @@ -46,4 +48,5 @@ spec:
{{- end }}
affinity: {{ toYaml .Values.syncer.affinity | nindent 8 }}
nodeSelector: {{ toYaml .Values.syncer.nodeSelector | nindent 8 }}
restartPolicy: {{ .Values.syncer.restartPolicy }}
restartPolicy: {{ .Values.syncer.restartPolicy }}
{{- end }}
2 changes: 2 additions & 0 deletions charts/cloudstack-csi/templates/syncer-rbac.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{ if .Values.syncer.enabled }}
{{ if .Values.syncer.rbac.create }}
---
apiVersion: v1
Expand Down Expand Up @@ -39,4 +40,5 @@ roleRef:
kind: ClusterRole
name: csi-sc-syncer-role
apiGroup: rbac.authorization.k8s.io
{{- end }}
{{- end }}
10 changes: 7 additions & 3 deletions charts/cloudstack-csi/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ podMonitor:

## CloudStack CSI Controller Defaults
controller:
enabled: true
attacher:
image:
repository: registry.k8s.io/sig-storage/csi-attacher
Expand All @@ -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
Expand Down Expand Up @@ -93,6 +94,7 @@ controller:

## CloudStack CSI Node Defaults
node:
enabled: true
nodeDriverRegistrar:
image:
repository: registry.k8s.io/sig-storage/csi-node-driver-registrar
Expand All @@ -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:
Expand All @@ -115,6 +117,7 @@ node:
- name: cacert
hostPath:
path: /etc/cacert
dnsPolicy: ClusterFirstWithHostNet

podSecurityContext: {}

Expand Down Expand Up @@ -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: {}
Expand Down
Loading