From 8fc3479428ecfd62ad7c03999beaabdb128a5ad3 Mon Sep 17 00:00:00 2001 From: Soam Vasani Date: Tue, 14 Nov 2017 22:59:01 -0800 Subject: [PATCH] only set nodeports when servicetype == nodeport --- charts/fission-all/templates/svc.yaml | 6 ++++++ charts/fission-core/templates/svc.yaml | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/charts/fission-all/templates/svc.yaml b/charts/fission-all/templates/svc.yaml index 1f756168..49c92f24 100644 --- a/charts/fission-all/templates/svc.yaml +++ b/charts/fission-all/templates/svc.yaml @@ -10,7 +10,9 @@ spec: ports: - port: 80 targetPort: 8888 +{{ if eq .Values.serviceType "NodePort" }} nodePort: {{ .Values.routerPort }} +{{ end }} selector: svc: router @@ -27,7 +29,9 @@ spec: ports: - port: 80 targetPort: 8888 +{{ if eq .Values.serviceType "NodePort" }} nodePort: {{ .Values.controllerPort }} +{{ end }} selector: svc: controller @@ -44,7 +48,9 @@ spec: ports: - port: 4222 targetPort: 4222 +{{ if eq .Values.serviceType "NodePort" }} nodePort: {{ .Values.natsStreamingPort }} +{{ end }} selector: svc: nats-streaming diff --git a/charts/fission-core/templates/svc.yaml b/charts/fission-core/templates/svc.yaml index 7a63273e..4ca2f0b7 100644 --- a/charts/fission-core/templates/svc.yaml +++ b/charts/fission-core/templates/svc.yaml @@ -10,7 +10,9 @@ spec: ports: - port: 80 targetPort: 8888 +{{ if eq .Values.serviceType "NodePort" }} nodePort: {{ .Values.routerPort }} +{{ end }} selector: svc: router @@ -27,7 +29,9 @@ spec: ports: - port: 80 targetPort: 8888 +{{ if eq .Values.serviceType "NodePort" }} nodePort: {{ .Values.controllerPort }} +{{ end }} selector: svc: controller