Skip to content

Commit

Permalink
charts: exclude multus configmap & secret & webhookconfig to helm upg…
Browse files Browse the repository at this point in the history
…rade

Signed-off-by: Cyclinder Kuo <[email protected]>
  • Loading branch information
cyclinder committed Dec 4, 2024
1 parent c167f4e commit d1d873b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions charts/spiderpool/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ metadata:
{{- if .Values.global.commonLabels }}
{{- include "tplvalues.render" ( dict "value" .Values.global.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
annotations:
"helm.sh/hook": pre-install
"helm.sh/resource_policy": keep
data:
cni-conf.json: |
{
Expand Down
10 changes: 10 additions & 0 deletions charts/spiderpool/templates/tls.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ metadata:
{{- if (eq .Values.spiderpoolController.tls.method "certmanager") }}
cert-manager.io/inject-ca-from: {{ .Release.Namespace }}/{{ .Values.spiderpoolController.name | trunc 63 | trimSuffix "-" }}-server-certs
{{- end }}
"helm.sh/hook": pre-install
"helm.sh/resource_policy": keep
webhooks:
- admissionReviewVersions:
- v1
Expand Down Expand Up @@ -154,6 +156,8 @@ metadata:
{{- if (eq .Values.spiderpoolController.tls.method "certmanager") }}
cert-manager.io/inject-ca-from: {{ .Release.Namespace }}/{{ .Values.spiderpoolController.name | trunc 63 | trimSuffix "-" }}-server-certs
{{- end }}
"helm.sh/hook": pre-install
"helm.sh/resource_policy": keep
webhooks:
- admissionReviewVersions:
- v1
Expand Down Expand Up @@ -324,6 +328,9 @@ kind: Secret
metadata:
name: {{ .Values.spiderpoolController.tls.secretName | trunc 63 | trimSuffix "-" }}
namespace: {{ .Release.Namespace }}
annotations:
"helm.sh/hook": pre-install
"helm.sh/resource_policy": keep
type: kubernetes.io/tls
data:
ca.crt: {{ .Values.spiderpoolController.tls.provided.tlsCa | required "missing spiderpoolController.tls.provided.tlsCa" }}
Expand All @@ -347,6 +354,9 @@ kind: Secret
metadata:
name: {{ .Values.spiderpoolController.tls.secretName | trunc 63 | trimSuffix "-" }}
namespace: {{ .Release.Namespace }}
annotations:
"helm.sh/hook": pre-install
"helm.sh/resource_policy": keep
type: kubernetes.io/tls
data:
ca.crt: {{ .ca.Cert | b64enc }}
Expand Down

0 comments on commit d1d873b

Please sign in to comment.