[STRIMZI] External Kafka Access via Ingress
[oom.git] / kubernetes / common / common / templates / _ingress.tpl
index 7065338..30ef022 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 */}}
+{{/*
+  Helper function to check, if Ingress is globally enabled
+*/}}
+{{- define "common.ingressEnabled" -}}
+{{-   $dot := default . .dot -}}
+{{-   if $dot.Values.ingress -}}
+{{-     if $dot.Values.global.ingress -}}
+{{-       if (default false $dot.Values.global.ingress.enabled) -}}
+true
+{{-       end -}}
+{{-     end -}}
+{{-   end -}}
+{{- end -}}
+
+
 {{/*
   Create the hostname as concatination <baseaddr>.<baseurl>
   - baseaddr: from component values: ingress.service.baseaddr