Merge "[AAI] Service Mesh compatibility"
[oom.git] / kubernetes / common / common / templates / _service.tpl
index 49f1b94..a488e0d 100644 (file)
@@ -323,6 +323,16 @@ true
 {{-   end }}
 {{- end -}}
 
+{{/*
+  generate needed scheme:
+    - https if needTLS
+    - http if not
+*/}}
+
+{{- define "common.scheme" -}}
+  {{- ternary "https" "http" (eq "true" (include "common.needTLS" .)) }}
+{{- end -}}
+
 {{- define "common.port.buildCache" -}}
   {{- $global := . }}
   {{- if not $global.Values._DmaapDrNodePortsCache }}