From 5a34c895f67fb720c4d00f698c27ed40eb3deb9d Mon Sep 17 00:00:00 2001 From: Tawsif Siddiqui <trafid@oteemo.com> Date: Wed, 15 Dec 2021 14:28:41 -0600 Subject: [PATCH] Updated BB code to include istio annotation in eck-operator template --- chart/templates/_helpers.tpl | 12 ++++++++++++ chart/templates/logging/eck-operator/values.yaml | 5 ++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/chart/templates/_helpers.tpl b/chart/templates/_helpers.tpl index 454428a932..ea9b587123 100644 --- a/chart/templates/_helpers.tpl +++ b/chart/templates/_helpers.tpl @@ -145,3 +145,15 @@ bigbang.addValueIfSet can be used to nil check parameters before adding them to {{- end }} {{- end }} {{- end -}} +{{/* +Annotation for Istio version +*/}} +{{- define "istioAnnotation" -}} + {{- if .Values.istio.git.semver -}} + bigbang.dev/istioVersion: {{ .Values.istio.git.semver | trimSuffix (regexFind "-bb.*" .Values.istio.git.semver) }} + {{- else if .Values.istio.git.tag -}} + bigbang.dev/istioVersion: {{ .Values.istio.git.tag | trimSuffix (regexFind "-bb.*" .Values.istio.git.tag) }} + {{- else if .Values.istio.git.branch -}} + bigbang.dev/istioVersion: {{ .Values.istio.git.branch }} + {{- end -}} +{{- end -}} diff --git a/chart/templates/logging/eck-operator/values.yaml b/chart/templates/logging/eck-operator/values.yaml index b96d4500f8..77fae81fc2 100644 --- a/chart/templates/logging/eck-operator/values.yaml +++ b/chart/templates/logging/eck-operator/values.yaml @@ -10,8 +10,11 @@ license: image: pullPolicy: {{ .Values.imagePullPolicy }} - + podAnnotations: +{{- if .Values.istio.enabled }} + {{ include "istioAnnotation" . }} +{{- end }} sidecar.istio.io/inject: "true" traffic.sidecar.istio.io/includeInboundPorts: "*" traffic.sidecar.istio.io/excludeInboundPorts: "9443" -- GitLab