mirror of
https://github.com/kubevela/kubevela.git
synced 2026-08-18 12:06:38 +00:00
fix: preserve existing caBundle during upgrade of cluster-gateway APIService (#7220)
Signed-off-by: Anaswara Suresh <anaswarasuresh2212@gmail.com>
This commit is contained in:
@@ -162,9 +162,18 @@ spec:
|
||||
versionPriority: 10
|
||||
insecureSkipTLSVerify: {{ not .Values.multicluster.clusterGateway.secureTLS.enabled }}
|
||||
{{ if .Values.multicluster.clusterGateway.secureTLS.enabled }}
|
||||
caBundle: Cg==
|
||||
{{- /* Preserve an already-valid caBundle on upgrade so we don't reset it to the
|
||||
Cg== placeholder before the patch Job re-runs
|
||||
$apiSvc is the existing APIService looked up above; fall back to the
|
||||
placeholder only on fresh install or when it still holds the placeholder. */}}
|
||||
{{- $caBundle := "Cg==" }}
|
||||
{{- if and $apiSvc $apiSvc.spec (hasKey $apiSvc.spec "caBundle") (ne $apiSvc.spec.caBundle "Cg==") }}
|
||||
{{- $caBundle = $apiSvc.spec.caBundle }}
|
||||
{{- end }}
|
||||
caBundle: {{ $caBundle }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
|
||||
Reference in New Issue
Block a user