Add loadbalancerip (#1265)

* Add ability to configure loadbalancerip on service
* Add docs for configuring loadbalancerip
This commit is contained in:
Gene Tomilko
2023-03-22 11:27:17 -07:00
committed by GitHub
parent 6fd969633e
commit 88b1a8c125
4 changed files with 15 additions and 0 deletions

View File

@@ -403,12 +403,14 @@ The following variables are customizable only when `service_type=LoadBalancer`
| --------------------- | ---------------------------------------- | ------- |
| loadbalancer_protocol | Protocol to use for Loadbalancer ingress | http |
| loadbalancer_port | Port used for Loadbalancer ingress | 80 |
| loadbalancer_ip | Assign Loadbalancer IP | '' |
```yaml
---
spec:
...
service_type: LoadBalancer
loadbalancer_ip: '192.168.10.25'
loadbalancer_protocol: https
loadbalancer_port: 443
service_annotations: |

View File

@@ -132,6 +132,10 @@ spec:
description: Port to use for the loadbalancer
type: integer
default: 80
loadbalancer_ip:
description: Assign LoadBalancer IP address
type: string
default: ''
route_host:
description: The DNS to use to points to the instance
type: string

View File

@@ -270,6 +270,12 @@ spec:
- urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:com.tectonic.ui:number
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:service_type:LoadBalancer
- displayName: LoadBalancer IP
path: loadbalancer_ip
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:com.tectonic.ui:string
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:service_type:LoadBalancer
- displayName: Route API Version
path: route_api_version
x-descriptors:

View File

@@ -53,6 +53,9 @@ spec:
type: NodePort
{% elif service_type | lower == "loadbalancer" %}
type: LoadBalancer
{% if variable is defined and variable|length %}
loadbalancerip: '{{ loadbalancer_ip }}'
{% endif %}
{% else %}
type: ClusterIP
{% endif %}