diff options
author | saul.gill <saul.gill@est.tech> | 2024-06-27 17:22:12 +0100 |
---|---|---|
committer | saul.gill <saul.gill@est.tech> | 2024-07-01 14:40:23 +0100 |
commit | 54d234de0d9260f610425cd496a52265a4082441 (patch) | |
tree | 68749c02437fe7b107f52da2f0bbce3e8ca9a811 /helm/policy/components/policy-clamp-ac-kserve-ppnt/templates/_helpers.tpl | |
parent | 5c67a88b56fbd0934a96b5f2801df0daf9a743fe (diff) |
Adding tracing config to helm charts for CSITs
Issue-ID: POLICY-5062
Change-Id: I99870cca1793385989a7c4b80049f7031558333e
Signed-off-by: saul.gill <saul.gill@est.tech>
Diffstat (limited to 'helm/policy/components/policy-clamp-ac-kserve-ppnt/templates/_helpers.tpl')
-rw-r--r-- | helm/policy/components/policy-clamp-ac-kserve-ppnt/templates/_helpers.tpl | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/helm/policy/components/policy-clamp-ac-kserve-ppnt/templates/_helpers.tpl b/helm/policy/components/policy-clamp-ac-kserve-ppnt/templates/_helpers.tpl new file mode 100644 index 00000000..a2882871 --- /dev/null +++ b/helm/policy/components/policy-clamp-ac-kserve-ppnt/templates/_helpers.tpl @@ -0,0 +1,58 @@ +{{/* +# +# ============LICENSE_START======================================================= +# Copyright (C) 2024 Nordix Foundation. +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= +# +*/}} + +{{/* +This helper defines which exporter port must be used depending on protocol +*/}} +{{- define "policy-clamp-ac-kserve-ppnt.exporter-port" }} + {{- $jaegerExporterPort := .Values.jaeger.collector.portOtlpGrpc -}} + {{- if .Values.jaeger.collector.protocol -}} + {{- if eq .Values.jaeger.collector.protocol "http" -}} + {{- $jaegerExporterPort = .Values.jaeger.collector.portOtlpHttp -}} + {{- end -}} + {{- end -}} + {{- $jaegerExporterPort -}} +{{- end -}} + +{{/* +This helper defines whether Jaeger is enabled or not. +*/}} +{{- define "policy-clamp-ac-kserve-ppnt.jaeger-enabled" }} + {{- $jaegerEnabled := "false" -}} + {{- if .Values.jaeger -}} + {{- if .Values.jaeger.enabled -}} + {{- $jaegerEnabled = .Values.jaeger.enabled -}} + {{- end -}} + {{- end -}} + {{- $jaegerEnabled -}} +{{- end -}} + +{{/* +This helper defines whether jaeger is using http or grpc protocol +*/}} +{{- define "policy-clamp-ac-kserve-ppnt.jaeger-protocol" }} + {{- $protocol := "grpc" -}} + {{- if eq .Values.jaeger.collector.protocol "http" -}} + {{- $protocol = "http/protobuf" -}} + {{- end -}} + {{- $protocol -}} +{{- end -}}
\ No newline at end of file |