Skip to content

Commit

Permalink
refactor(charts): simplify CRD helm chart values
Browse files Browse the repository at this point in the history
Signed-off-by: Niladri Halder <[email protected]>
  • Loading branch information
niladrih committed Mar 19, 2024
1 parent d468819 commit ae884d7
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 55 deletions.
1 change: 0 additions & 1 deletion deploy/helm/charts/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ sources:
dependencies:
- name: crds
version: "2.5.0"
condition: crds.enabled
maintainers:
- name: xUnholy
email: [email protected]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and .Values.volumeSnapshots.enabled .Values.volumeSnapshots.snapshotClassesEnabled -}}
{{- if .Values.csi.volumeSnapshots.enabled -}}
{{- $crdName := "volumesnapshotclasses.snapshot.storage.k8s.io" -}}
{{- if (include "crdIsAbsent" (list $crdName)) -}}
apiVersion: apiextensions.k8s.io/v1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and .Values.volumeSnapshots.enabled .Values.volumeSnapshots.snapshotContentsEnabled -}}
{{- if .Values.csi.volumeSnapshots.enabled -}}
{{- $crdName := "volumesnapshotcontents.snapshot.storage.k8s.io" -}}
{{- if (include "crdIsAbsent" (list $crdName)) -}}
apiVersion: apiextensions.k8s.io/v1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and .Values.volumeSnapshots.enabled .Values.volumeSnapshots.snapshotsEnabled -}}
{{- if .Values.csi.volumeSnapshots.enabled -}}
{{- $crdName := "volumesnapshots.snapshot.storage.k8s.io" -}}
{{- if (include "crdIsAbsent" (list $crdName)) -}}
apiVersion: apiextensions.k8s.io/v1
Expand Down
2 changes: 1 addition & 1 deletion deploy/helm/charts/charts/crds/templates/zfsbackup.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.zfsBackups.enabled -}}
{{- if .Values.zfsLocalPv.enabled -}}
{{- $crdName := "zfsbackups.zfs.openebs.io" -}}
{{- if (include "crdIsAbsent" (list $crdName)) -}}
##############################################
Expand Down
2 changes: 1 addition & 1 deletion deploy/helm/charts/charts/crds/templates/zfsnode.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.zfsNodes.enabled -}}
{{- if .Values.zfsLocalPv.enabled -}}
{{- $crdName := "zfsnodes.zfs.openebs.io" -}}
{{- if (include "crdIsAbsent" (list $crdName)) -}}
##############################################
Expand Down
2 changes: 1 addition & 1 deletion deploy/helm/charts/charts/crds/templates/zfsrestore.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.zfsRestores.enabled -}}
{{- if .Values.zfsLocalPv.enabled -}}
{{- $crdName := "zfsrestores.zfs.openebs.io" -}}
{{- if (include "crdIsAbsent" (list $crdName)) -}}
##############################################
Expand Down
2 changes: 1 addition & 1 deletion deploy/helm/charts/charts/crds/templates/zfssnapshot.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.zfsSnapshots.enabled -}}
{{- if .Values.zfsLocalPv.enabled -}}
{{- $crdName := "zfssnapshots.zfs.openebs.io" -}}
{{- if (include "crdIsAbsent" (list $crdName)) -}}
##############################################
Expand Down
2 changes: 1 addition & 1 deletion deploy/helm/charts/charts/crds/templates/zfsvolume.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.zfsVolumes.enabled -}}
{{- if .Values.zfsLocalPv.enabled -}}
{{- $crdName := "zfsvolumes.zfs.openebs.io" -}}
{{- if (include "crdIsAbsent" (list $crdName)) -}}
##############################################
Expand Down
33 changes: 6 additions & 27 deletions deploy/helm/charts/charts/crds/values.yaml
Original file line number Diff line number Diff line change
@@ -1,29 +1,8 @@
zfsBackups:
# -- Install ZfsBackup CRD
zfsLocalPv:
# Install zfs-localpv CRDs
enabled: true

zfsNodes:
# -- Install ZfsNode CRD
enabled: true

zfsRestores:
# -- Install ZfsRestore CRD
enabled: true

zfsSnapshots:
# -- Install ZfsSnapshot CRD
enabled: true

zfsVolumes:
# -- Install ZfsVolume CRD
enabled: true

volumeSnapshots:
# -- Install Volume Snapshot CRDs
enabled: true
# -- Install volumesnapshots.snapshot.storage.k8s.io CRD
snapshotsEnabled: true
# -- Install volumesnapshotclasses.snapshot.storage.k8s.io CRD
snapshotClassesEnabled: true
# -- Install volumesnapshotcontents.snapshot.storage.k8s.io CRD
snapshotContentsEnabled: true
csi:
volumeSnapshots:
# Install Volume Snapshot CRDs
enabled: true
25 changes: 6 additions & 19 deletions deploy/helm/charts/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -174,23 +174,10 @@ zfs:
bin: zfs

crds:
# Enable/Disable all CRDs
enabled: true
zfsBackups:
# -- Install ZfsBackup CRD
enabled: true
zfsNodes:
# -- Install ZfsNode CRD
enabled: true
zfsRestores:
# -- Install ZfsRestore CRD
enabled: true
zfsSnapshots:
# -- Install ZfsSnapshot CRD
enabled: true
zfsVolumes:
# -- Install ZfsVolume CRD
enabled: true
volumeSnapshots:
# -- Install Volume Snapshot CRDs
zfsLocalPv:
# Install zfs-localpv CRDs
enabled: true
csi:
volumeSnapshots:
# Install Volume Snapshot CRDs
enabled: true

0 comments on commit ae884d7

Please sign in to comment.