-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: crds getting removed on helm upgrades (#289)
* fix: crds getting removed on helm upgrades Signed-off-by: Abhinandan Purkait <[email protected]> * fix: crds getting removed on helm upgrades Signed-off-by: Abhinandan Purkait <[email protected]> * chore: add condition for the crds subchart Signed-off-by: Abhinandan Purkait <[email protected]> * feat(chart): remove quotes from version Signed-off-by: Abhinandan Purkait <[email protected]> * feat(chart): update README Signed-off-by: Abhinandan Purkait <[email protected]> --------- Signed-off-by: Abhinandan Purkait <[email protected]>
- Loading branch information
1 parent
731233a
commit cd7e9b7
Showing
13 changed files
with
34 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ target-branch: develop | |
chart-dirs: | ||
- deploy/helm | ||
helm-extra-args: --timeout=500s | ||
validate-maintainers: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
apiVersion: v2 | ||
name: lvm-localpv | ||
description: CSI Driver for dynamic provisioning of LVM Persistent Local Volumes. | ||
version: 1.5.0 | ||
version: 1.5.1 | ||
appVersion: 1.5.0 | ||
icon: https://raw.githubusercontent.com/cncf/artwork/master/projects/openebs/icon/color/openebs-icon-color.png | ||
home: https://openebs.io/ | ||
|
@@ -16,11 +16,5 @@ sources: | |
- https://github.com/openebs/lvm-localpv | ||
dependencies: | ||
- name: crds | ||
version: "1.5.0" | ||
maintainers: | ||
- name: prateekpandey14 | ||
email: [email protected] | ||
- name: pawanpraka1 | ||
email: [email protected] | ||
- name: iyashu | ||
email: [email protected] | ||
version: 1.5.1 | ||
condition: crds.enabled |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
apiVersion: v2 | ||
name: crds | ||
version: 1.5.0 | ||
version: 1.5.1 | ||
description: A Helm chart that collects CustomResourceDefinitions (CRDs) from lvm-localpv. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,18 @@ | ||
{{/* vim: set filetype=mustache: */}} | ||
|
||
{{/* | ||
This returns a "1" if the CRD is absent in the cluster | ||
Adds extra annotations to CRDs. This targets two scenarios: preventing CRD recycling in case | ||
the chart is removed; and adding custom annotations. | ||
NOTE: This function assumes the element `metadata.annotations` already exists. | ||
Usage: | ||
{{- if (include "crdIsAbsent" (list <crd-name>)) -}} | ||
# CRD Yaml | ||
{{- end -}} | ||
{{- include "crds.extraAnnotations" .Values.csi.volumeSnapshots | nindent 4 }} | ||
*/}} | ||
{{- define "crdIsAbsent" -}} | ||
{{- $crdName := index . 0 -}} | ||
{{- $crd := lookup "apiextensions.k8s.io/v1" "CustomResourceDefinition" "" $crdName -}} | ||
{{- $output := "1" -}} | ||
{{- if $crd -}} | ||
{{- $output = "" -}} | ||
{{- end -}} | ||
|
||
{{- $output -}} | ||
{{- define "crds.extraAnnotations" -}} | ||
{{- if .keep -}} | ||
helm.sh/resource-policy: keep | ||
{{ end }} | ||
{{- with .annotations }} | ||
{{- toYaml . }} | ||
{{- end }} | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
lvmLocalPv: | ||
# Install lvm-localpv CRDs | ||
enabled: true | ||
# Keep CRDs on chart uninstall | ||
keep: true | ||
|
||
csi: | ||
volumeSnapshots: | ||
# Install Volume Snapshot CRDs | ||
enabled: true | ||
# Keep CRDs on chart uninstall | ||
keep: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters