mirror of
https://github.com/truecharts/library-charts.git
synced 2026-07-04 21:21:23 -03:00
fix last tests
This commit is contained in:
@@ -64,10 +64,19 @@
|
||||
{{- end -}}
|
||||
|
||||
{{- with $selectedIngress -}}
|
||||
{{- $firstHost := ((.hosts | default list) | mustFirst) -}}
|
||||
{{- $firstHost := list -}}
|
||||
{{- if (kindIs "slice" .hosts) -}}
|
||||
{{- $firstHost = ((.hosts | default list) | mustFirst) -}}
|
||||
{{- end -}}
|
||||
{{- if $firstHost -}}
|
||||
{{- $host = tpl $firstHost.host $rootCtx -}}
|
||||
{{- $firstPath := (($firstHost.paths | default list) | mustFirst) -}}
|
||||
{{- if $firstHost.host -}}
|
||||
{{- $host = tpl $firstHost.host $rootCtx -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $firstPath := list -}}
|
||||
{{- if (kindIs "slice" $firstHost.paths) -}}
|
||||
{{- $firstPath = (($firstHost.paths | default list) | mustFirst) -}}
|
||||
{{- end -}}
|
||||
{{- if $firstPath -}}
|
||||
{{- $path = $firstPath.path -}}
|
||||
{{- end -}}
|
||||
@@ -120,7 +129,10 @@
|
||||
{{- $primaryPort := dict -}}
|
||||
{{- if $selectedService -}}
|
||||
{{- $primaryPortName := include "tc.v1.common.lib.util.service.ports.primary" (dict "rootCtx" $rootCtx "svcValues" $selectedService) -}}
|
||||
{{- $selectedPort := (get $selectedService.ports $primaryPortName) -}}
|
||||
{{- $selectedPort := dict -}}
|
||||
{{- if $selectedService.ports -}} {{/* eg, ExternalName does not require ports */}}
|
||||
{{- $selectedPort = (get $selectedService.ports $primaryPortName) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- with $objectData.targetSelector -}}
|
||||
{{- if .port -}}
|
||||
@@ -133,7 +145,9 @@
|
||||
|
||||
{{- if not $selectedPort -}}
|
||||
{{- $portName := ($selectedService.ports | keys | sortAlpha | mustFirst) -}}
|
||||
{{- $selectedPort = (get $selectedService.ports $portName) -}}
|
||||
{{- if $selectedService.ports -}} {{/* eg, ExternalName does not require ports */}}
|
||||
{{- $selectedPort = (get $selectedService.ports $portName) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $port = tpl ($selectedPort.port | toString) $rootCtx -}}
|
||||
|
||||
@@ -4,10 +4,14 @@
|
||||
|
||||
{{- $result := "" -}}
|
||||
{{- range $name, $ingress := $rootCtx.Values.ingress -}}
|
||||
{{- $enabled := (include "tc.v1.common.lib.util.enabled" (dict
|
||||
"rootCtx" $rootCtx "objectData" $ingress
|
||||
"name" $name "caller" "Primary Ingress Util"
|
||||
"key" "ingress")) -}}
|
||||
{{- $enabled := "false" -}}
|
||||
|
||||
{{- if not (kindIs "invalid" $ingress.enabled) -}}
|
||||
{{- $enabled = (include "tc.v1.common.lib.util.enabled" (dict
|
||||
"rootCtx" $rootCtx "objectData" $ingress
|
||||
"name" $name "caller" "Primary Ingress Util"
|
||||
"key" "ingress")) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if eq $enabled "true" -}}
|
||||
{{- if $ingress.primary -}}
|
||||
|
||||
@@ -6,10 +6,14 @@
|
||||
|
||||
{{- $result := "" -}}
|
||||
{{- range $name, $port := $svcValues.ports -}}
|
||||
{{- $enabled := (include "tc.v1.common.lib.util.enabled" (dict
|
||||
"rootCtx" $rootCtx "objectData" $port
|
||||
"name" $name "caller" "Primary Port Util"
|
||||
"key" ".ports.$portname.enabled")) -}}
|
||||
{{- $enabled := "false" -}}
|
||||
|
||||
{{- if not (kindIs "invalid" $port.enabled) -}}
|
||||
{{- $enabled := (include "tc.v1.common.lib.util.enabled" (dict
|
||||
"rootCtx" $rootCtx "objectData" $port
|
||||
"name" $name "caller" "Primary Port Util"
|
||||
"key" ".ports.$portname.enabled")) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if eq $enabled "true" -}}
|
||||
{{- if $port.primary -}}
|
||||
|
||||
@@ -4,10 +4,14 @@
|
||||
|
||||
{{- $result := "" -}}
|
||||
{{- range $name, $service := $rootCtx.Values.service -}}
|
||||
{{- $enabled := (include "tc.v1.common.lib.util.enabled" (dict
|
||||
"rootCtx" $rootCtx "objectData" $service
|
||||
"name" $name "caller" "Primary service Util"
|
||||
"key" "service")) -}}
|
||||
{{- $enabled := "false" -}}
|
||||
|
||||
{{- if not (kindIs "invalid" $service.enabled) -}}
|
||||
{{- $enabled := (include "tc.v1.common.lib.util.enabled" (dict
|
||||
"rootCtx" $rootCtx "objectData" $service
|
||||
"name" $name "caller" "Primary service Util"
|
||||
"key" "service")) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if eq $enabled "true" -}}
|
||||
{{- if $service.primary -}}
|
||||
|
||||
Reference in New Issue
Block a user