mirror of
https://github.com/alibaba/higress.git
synced 2026-05-27 22:27:29 +08:00
fix: fix tracing configmap template to handle initial installation (#1191)
This commit is contained in:
@@ -97,7 +97,7 @@ higress: {{ include "controller.name" . }}
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- define "skywalking.enabled" -}}
|
{{- define "skywalking.enabled" -}}
|
||||||
{{- if and .Values.tracing.enable (hasKey .Values.tracing "skywalking") .Values.tracing.skywalking.service }}
|
{{- if and (hasKey .Values "tracing") .Values.tracing.enable (hasKey .Values.tracing "skywalking") .Values.tracing.skywalking.service }}
|
||||||
true
|
true
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@@ -107,9 +107,12 @@ metadata:
|
|||||||
data:
|
data:
|
||||||
higress: |-
|
higress: |-
|
||||||
{{- $existingConfig := lookup "v1" "ConfigMap" .Release.Namespace "higress-config" }}
|
{{- $existingConfig := lookup "v1" "ConfigMap" .Release.Namespace "higress-config" }}
|
||||||
{{- $existingData := index $existingConfig.data "higress" | default "{}" | fromYaml }}
|
{{- $existingData := dict }}
|
||||||
|
{{- if $existingConfig }}
|
||||||
|
{{- $existingData = index $existingConfig.data "higress" | default "{}" | fromYaml }}
|
||||||
|
{{- end }}
|
||||||
{{- $newData := dict }}
|
{{- $newData := dict }}
|
||||||
{{- if .Values.tracing.enable }}
|
{{- if and (hasKey .Values "tracing") .Values.tracing.enable }}
|
||||||
{{- $_ := set $newData "tracing" .Values.tracing }}
|
{{- $_ := set $newData "tracing" .Values.tracing }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- toYaml (merge $existingData $newData) | nindent 4 }}
|
{{- toYaml (merge $existingData $newData) | nindent 4 }}
|
||||||
|
|||||||
Reference in New Issue
Block a user