X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?p=it%2Fdep.git;a=blobdiff_plain;f=smo-install%2Foran_oom%2Fnonrtric-common%2Ftemplates%2F_ingress.tpl;fp=smo-install%2Foran_oom%2Fnonrtric-common%2Ftemplates%2F_nonrtricgateway.tpl;h=c5cf507e17fc84c8146d37b0027f1b1fd0c0afb1;hp=d14e540b21bf10002e6c2cdacd2767eec8cfdb4b;hb=918108f729c368db61fe904024129f21269e19b7;hpb=c9ace66e2b4635918c4c4c473dfc7bcbeb41b7ae diff --git a/smo-install/oran_oom/nonrtric-common/templates/_nonrtricgateway.tpl b/smo-install/oran_oom/nonrtric-common/templates/_ingress.tpl similarity index 68% rename from smo-install/oran_oom/nonrtric-common/templates/_nonrtricgateway.tpl rename to smo-install/oran_oom/nonrtric-common/templates/_ingress.tpl index d14e540b..c5cf507e 100644 --- a/smo-install/oran_oom/nonrtric-common/templates/_nonrtricgateway.tpl +++ b/smo-install/oran_oom/nonrtric-common/templates/_ingress.tpl @@ -1,5 +1,6 @@ +{{/* ################################################################################ -# Copyright (c) 2021 Nordix Foundation. # +# Copyright (c) 2024 NYCU WINLab. # # # # Licensed under the Apache License, Version 2.0 (the "License"); # # you may not use this file except in compliance with the License. # @@ -13,16 +14,23 @@ # See the License for the specific language governing permissions and # # limitations under the License. # ################################################################################ - -{{- define "common.name.nonrtricgateway" -}} - {{- printf "nonrtricgateway" -}} -{{- end -}} - -{{- define "common.container.nonrtricgateway" -}} - {{- $name := ( include "common.name.nonrtricgateway" . ) -}} - {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}} +*/}} +{{- define "common.ingressClassName" -}} + {{- if and .Values.global .Values.global.ingress -}} + {{- default "kong" .Values.global.ingress.ingressClass -}} + {{- else -}} + {{- print "kong" -}} + {{- end -}} {{- end -}} -{{- define "common.ingressClassName" -}} - {{- printf "kong" -}} +{{- define "common.ingressEnabled" -}} + {{- if and .Values.global .Values.global.ingress -}} + {{- if .Values.global.ingress.enabled -}} + {{- if or .Values.global.ingress.enabled_all .Values.ingress.enabled -}} + true + {{- end -}} + {{- end -}} + {{- else -}} + {{- .Values.ingress.enabled -}} + {{- end -}} {{- end -}}