From 5de8b9436f2852fee4082a84d5af8b76157ccbaa Mon Sep 17 00:00:00 2001 From: Holden Omans Date: Tue, 26 Dec 2023 10:41:04 -0500 Subject: [PATCH] update istio-service charts --- charts/istio-service/templates/service_entry.yaml | 4 ++++ charts/istio-service/templates/virtual_service.yaml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/charts/istio-service/templates/service_entry.yaml b/charts/istio-service/templates/service_entry.yaml index 53adb9c..72e1e77 100644 --- a/charts/istio-service/templates/service_entry.yaml +++ b/charts/istio-service/templates/service_entry.yaml @@ -13,9 +13,13 @@ spec: addresses: - {{ $service.ip }} ports: +{{- if $service.ports }} +{{ toYaml $service.ports | indent 4 }} +{{- else }} - number: {{ $service.port }} name: http protocol: HTTP +{{- end }} resolution: STATIC endpoints: - address: {{ $service.ip }} diff --git a/charts/istio-service/templates/virtual_service.yaml b/charts/istio-service/templates/virtual_service.yaml index 4091bcb..bdde26d 100644 --- a/charts/istio-service/templates/virtual_service.yaml +++ b/charts/istio-service/templates/virtual_service.yaml @@ -13,10 +13,14 @@ spec: gateways: - {{ $service.name }}-gateway http: +{{- if $service.routes }} +{{ toYaml $service.routes | indent 4 }} +{{- else }} - route: - destination: host: {{$service.hosts | first}} port: number: {{ $service.port }} weight: 100 +{{- end }} {{- end }} \ No newline at end of file