-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(bors): merge pull request #459
459: Cherry helm PR 458 r=tiagolobocastro a=tiagolobocastro <! Co-authored-by: cmontemuino <[email protected]>
- Loading branch information
Showing
7 changed files
with
38 additions
and
25 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
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,19 +1,20 @@ | ||
{{/* 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 -}} | ||
{{- end -}} | ||
{{- 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,21 @@ | ||
jaeger: | ||
# -- Install Jaeger CRDs | ||
enabled: true | ||
# -- Keep CRDs on chart uninstall | ||
keep: true | ||
# -- Annotations to be added to all CRDs | ||
annotations: {} | ||
# Example for Argo CD to prevent CRDs from being recycled | ||
# argocd.argoproj.io/sync-options: Prune=false | ||
|
||
csi: | ||
volumeSnapshots: | ||
# -- Install Volume Snapshot CRDs | ||
enabled: true | ||
# -- Keep CRDs on chart uninstall | ||
keep: true | ||
# -- Annotations to be added to all CRDs | ||
annotations: {} | ||
# Example for Argo CD to prevent CRDs from being recycled | ||
# argocd.argoproj.io/sync-options: Prune=false | ||
|