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 611aa8b commit 9268adb
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 40 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: "1.5.0"
condition: crds.enabled
maintainers:
- name: prateekpandey14
email: [email protected]
Expand Down
3 changes: 2 additions & 1 deletion deploy/helm/charts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ helm install openebs-lvmlocalpv openebs-lvmlocalpv/lvm-localpv --namespace opene

| Parameter | Description | Default |
|-----------------------------------------------------|----------------------------------------------------------------------------------|-----------------------------------------|
| `imagePullSecrets` | Provides image pull secrect | `""` |
| `crds.csi.volumeSnapshots.enabled` | Enable/Disable installation of VolumeSnapshot-related CRDs | `true` |
| `imagePullSecrets` | Provides image pull secret | `""` |
| `lvmPlugin.image.registry` | Registry for openebs-lvm-plugin image | `""` |
| `lvmPlugin.image.repository` | Image repository for openebs-lvm-plugin | `openebs/lvm-driver` |
| `lvmPlugin.image.pullPolicy` | Image pull policy for openebs-lvm-plugin | `IfNotPresent` |
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/lvmnode.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.lvmNodes.enabled -}}
{{- if .Values.lvmLocalPv.enabled -}}
{{- $crdName := "lvmnodes.local.openebs.io" -}}
{{- if (include "crdIsAbsent" (list $crdName)) -}}
##############################################
Expand Down
2 changes: 1 addition & 1 deletion deploy/helm/charts/charts/crds/templates/lvmsnapshot.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.lvmSnapshots.enabled -}}
{{- if .Values.lvmLocalPv.enabled -}}
{{- $crdName := "lvmsnapshots.local.openebs.io" -}}
{{- if (include "crdIsAbsent" (list $crdName)) -}}
##############################################
Expand Down
2 changes: 1 addition & 1 deletion deploy/helm/charts/charts/crds/templates/lvmvolume.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.lvmVolumes.enabled -}}
{{- if .Values.lvmLocalPv.enabled -}}
{{- $crdName := "lvmvolumes.local.openebs.io" -}}
{{- if (include "crdIsAbsent" (list $crdName)) -}}
##############################################
Expand Down
25 changes: 6 additions & 19 deletions deploy/helm/charts/charts/crds/values.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
lvmNodes:
# -- Install ZfsNode CRD
lvmLocalPv:
# Install lvm-localpv CRDs
enabled: true

lvmSnapshots:
# -- Install ZfsSnapshot CRD
enabled: true

lvmVolumes:
# -- 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
20 changes: 7 additions & 13 deletions deploy/helm/charts/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -184,17 +184,11 @@ analytics:
enabled: true

crds:
# Enable/Disable all CRDs
enabled: true
lvmNodes:
# -- Install ZfsNode CRD
enabled: true
lvmSnapshots:
# -- Install ZfsSnapshot CRD
enabled: true
lvmVolumes:
# -- Install ZfsVolume CRD
enabled: true
volumeSnapshots:
# -- Install Volume Snapshot CRDs
lvmLocalPv:
# Install lvm-localpv CRDs
enabled: true

csi:
volumeSnapshots:
# Install Volume Snapshot CRDs
enabled: true

Check failure on line 194 in deploy/helm/charts/values.yaml

View workflow job for this annotation

GitHub Actions / lint-test

194:20 [new-line-at-end-of-file] no new line character at the end of file

0 comments on commit 9268adb

Please sign in to comment.