From 059b6e885f5bfad077e0e61e0dcf870cbe4282c2 Mon Sep 17 00:00:00 2001 From: Ryan Richard Date: Wed, 28 Oct 2020 16:45:23 -0700 Subject: [PATCH] Allow ytt templating of the `loadBalancerIP` for the supervisor --- deploy/supervisor/service.yaml | 3 +++ deploy/supervisor/values.yaml | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/deploy/supervisor/service.yaml b/deploy/supervisor/service.yaml index e2841a63..d8739c40 100644 --- a/deploy/supervisor/service.yaml +++ b/deploy/supervisor/service.yaml @@ -74,6 +74,9 @@ metadata: spec: type: LoadBalancer selector: #@ defaultLabel() + #@ if data.values.service_loadbalancer_ip: + loadBalancerIP: #@ data.values.service_loadbalancer_ip + #@ end ports: #@ if data.values.service_http_loadbalancer_port: - name: http diff --git a/deploy/supervisor/values.yaml b/deploy/supervisor/values.yaml index aea4a04e..f9e1aac0 100644 --- a/deploy/supervisor/values.yaml +++ b/deploy/supervisor/values.yaml @@ -39,6 +39,7 @@ image_pull_dockerconfigjson: #! e.g. {"auths":{"https://registry.example.com":{" #! Typically you would set a value for only one of the following service types, for either HTTP or HTTPS depending on your needs. #! An HTTP service should not be exposed outside the cluster. It would not be secure to serve OIDC endpoints to end users via HTTP. #! Setting any of these values means that a Service of that type will be created. +#! Note that all port numbers should be numbers (not strings), i.e. use ytt's `--data-value-yaml` instead of `--data-value`. service_http_nodeport_port: #! when specified, creates a NodePort Service with this `port` value, with port 80 as its `targetPort`; e.g. 31234 service_http_nodeport_nodeport: #! the `nodePort` value of the NodePort Service, optional when `service_http_nodeport_port` is specified; e.g. 31234 service_http_loadbalancer_port: #! when specified, creates a LoadBalancer Service with this `port` value, with port 80 as its `targetPort`; e.g. 443 @@ -47,3 +48,7 @@ service_https_nodeport_port: #! when specified, creates a NodePort Service with service_https_nodeport_nodeport: #! the `nodePort` value of the NodePort Service, optional when `service_http_nodeport_port` is specified; e.g. 31243 service_https_loadbalancer_port: #! when specified, creates a LoadBalancer Service with this `port` value, with port 443 as its `targetPort`; e.g. 443 service_https_clusterip_port: #! when specified, creates a ClusterIP Service with this `port` value, with port 443 as its `targetPort`; e.g. 443 +#! The `loadBalancerIP` value of the LoadBalancer Service. +#! Ignored unless service_http_loadbalancer_port and/or service_https_loadbalancer_port are provided. +#! Optional. +service_loadbalancer_ip: #! e.g. 1.2.3.4