From 10c9c79945fae8408c9b18b12aeeba0b8d95db63 Mon Sep 17 00:00:00 2001 From: Jeev B Date: Tue, 16 Apr 2019 11:29:45 -0700 Subject: [PATCH] Add provision to specify loadBalancerSourceRanges for Argo UI LoadBalancer service resource. (#44) --- charts/argo/templates/ui-service.yaml | 3 +++ charts/argo/values.yaml | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/charts/argo/templates/ui-service.yaml b/charts/argo/templates/ui-service.yaml index b83e5532..56cead02 100644 --- a/charts/argo/templates/ui-service.yaml +++ b/charts/argo/templates/ui-service.yaml @@ -18,3 +18,6 @@ spec: app: {{ .Release.Name }}-{{ .Values.ui.name }} sessionAffinity: None type: {{ .Values.ui.serviceType }} + {{- if and (eq .Values.ui.serviceType "LoadBalancer") .Values.ui.loadBalancerSourceRanges }} + loadBalancerSourceRanges: +{{ toYaml .Values.ui.loadBalancerSourceRanges | indent 4 }}{{- end }} diff --git a/charts/argo/values.yaml b/charts/argo/values.yaml index bb0985fa..161d9f59 100644 --- a/charts/argo/values.yaml +++ b/charts/argo/values.yaml @@ -40,7 +40,10 @@ ui: serviceAccount: argo-ui # Annotations to be applied to the UI Service serviceAnnotations: {} - + # Source ranges to allow access to service from. Only applies to + # service type `LoadBalancer` + loadBalancerSourceRanges: [] + ## Ingress configuration. ## ref: https://kubernetes.io/docs/user-guide/ingress/ ##