From dac80365f9f7d1fe1666f8b32772fe8c64ac6b42 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 1f7561688..49c92f244 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 7a63273e1..4ca2f0b70 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