diff --git a/config/crd/bases/awx.ansible.com_awxs.yaml b/config/crd/bases/awx.ansible.com_awxs.yaml index 66306aec..4cb028a1 100644 --- a/config/crd/bases/awx.ansible.com_awxs.yaml +++ b/config/crd/bases/awx.ansible.com_awxs.yaml @@ -159,6 +159,10 @@ spec: description: Assign LoadBalancer IP address type: string default: '' + loadbalancer_class: + description: Class of LoadBalancer to use + type: string + default: '' route_host: description: The DNS to use to points to the instance type: string diff --git a/config/manifests/bases/awx-operator.clusterserviceversion.yaml b/config/manifests/bases/awx-operator.clusterserviceversion.yaml index a9fd0060..5fce6782 100644 --- a/config/manifests/bases/awx-operator.clusterserviceversion.yaml +++ b/config/manifests/bases/awx-operator.clusterserviceversion.yaml @@ -387,6 +387,12 @@ spec: - 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: LoadBalancer Class + path: loadbalancer_class + 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: diff --git a/docs/user-guide/network-and-tls-configuration.md b/docs/user-guide/network-and-tls-configuration.md index 0eaa0a00..de81e08a 100644 --- a/docs/user-guide/network-and-tls-configuration.md +++ b/docs/user-guide/network-and-tls-configuration.md @@ -33,6 +33,7 @@ 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 | '' | +| loadbalancer_class | LoadBalancer class to use | '' | ```yaml --- @@ -42,6 +43,7 @@ spec: loadbalancer_ip: '192.168.10.25' loadbalancer_protocol: https loadbalancer_port: 443 + loadbalancer_class: service.k8s.aws/nlb service_annotations: | environment: testing service_labels: | diff --git a/roles/installer/defaults/main.yml b/roles/installer/defaults/main.yml index 0b3293d2..726f2f11 100644 --- a/roles/installer/defaults/main.yml +++ b/roles/installer/defaults/main.yml @@ -52,6 +52,7 @@ ingress_hosts: '' loadbalancer_protocol: 'http' loadbalancer_port: '80' +loadbalancer_class: '' service_annotations: '' # Port to be used for NodePort configuration, default is to auto-assign a port between 30000-32768 diff --git a/roles/installer/templates/networking/service.yaml.j2 b/roles/installer/templates/networking/service.yaml.j2 index 80766a9c..00117b50 100644 --- a/roles/installer/templates/networking/service.yaml.j2 +++ b/roles/installer/templates/networking/service.yaml.j2 @@ -55,6 +55,9 @@ spec: {% if loadbalancer_ip is defined and loadbalancer_ip | length %} loadbalancerip: '{{ loadbalancer_ip }}' {% endif %} +{% if loadbalancer_class is defined and loadbalancer_class | length %} + loadBalancerClass: {{ loadbalancer_class }} +{% endif %} {% else %} type: ClusterIP {% endif %}