Added nodeport properties

This commit is contained in:
Cliff Hults
2021-08-14 19:50:29 -04:00
parent 0da8f41a86
commit 9b072aa549
8 changed files with 44 additions and 2 deletions

View File

@@ -252,6 +252,21 @@ When setting up a Load Balancer for HTTPS you will be required to set the `loadb
The HTTPS Load Balancer also uses SSL termination at the Load Balancer level and will offload traffic to AWX over HTTP. The HTTPS Load Balancer also uses SSL termination at the Load Balancer level and will offload traffic to AWX over HTTP.
* NodePort
The following variables are customizable only when `service_type=NodePort`
| Name | Description | Default |
| ------------------------------ | ---------------------------------------- | ------------- |
| nodeport_port | Port used for NodePort | 80 |
```yaml
---
spec:
...
service_type: NodePort
nodeport_port: 30080
```
#### Ingress Type #### Ingress Type
By default, the AWX operator is not opinionated and won't force a specific ingress type on you. So, when the `ingress_type` is not specified, it will default to `none` and nothing ingress-wise will be created. By default, the AWX operator is not opinionated and won't force a specific ingress type on you. So, when the `ingress_type` is not specified, it will default to `none` and nothing ingress-wise will be created.

View File

@@ -109,6 +109,10 @@ spec:
description: Port to use for the loadbalancer description: Port to use for the loadbalancer
type: integer type: integer
default: 80 default: 80
nodeport_port:
description: Port to use for the nodeport
type: integer
default: 30080
route_host: route_host:
description: The DNS to use to points to the instance description: The DNS to use to points to the instance
type: string type: string

View File

@@ -126,6 +126,10 @@ spec:
route_tls_secret: route_tls_secret:
description: Secret where the TLS related credentials are stored description: Secret where the TLS related credentials are stored
type: string type: string
nodeport_port:
description: Port to use for the nodeport
type: integer
default: 30080
node_selector: node_selector:
description: nodeSelector for the pods description: nodeSelector for the pods
type: string type: string

View File

@@ -124,6 +124,10 @@ spec:
route_tls_secret: route_tls_secret:
description: Secret where the TLS related credentials are stored description: Secret where the TLS related credentials are stored
type: string type: string
nodeport_port:
description: Port to use for the nodeport
type: integer
default: 30080
node_selector: node_selector:
description: nodeSelector for the pods description: nodeSelector for the pods
type: string type: string

View File

@@ -248,6 +248,12 @@ spec:
- urn:alm:descriptor:com.tectonic.ui:advanced - urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:com.tectonic.ui:number - urn:alm:descriptor:com.tectonic.ui:number
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:service_type:LoadBalancer - urn:alm:descriptor:com.tectonic.ui:fieldDependency:service_type:LoadBalancer
- displayName: Tower NodePort Port
path: nodeport_port
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:com.tectonic.ui:number
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:service_type:NodePort
- displayName: Route DNS host - displayName: Route DNS host
path: route_host path: route_host
x-descriptors: x-descriptors:

View File

@@ -189,6 +189,10 @@ spec:
- http - http
- https - https
type: string type: string
nodeport_port:
default: 30080
description: Port to use for the nodeport
type: integer
node_selector: node_selector:
description: nodeSelector for the pods description: nodeSelector for the pods
type: string type: string

View File

@@ -37,6 +37,7 @@ loadbalancer_protocol: 'http'
loadbalancer_port: '80' loadbalancer_port: '80'
loadbalancer_annotations: '' loadbalancer_annotations: ''
nodeport_port: '30080'
# The TLS termination mechanism to use to access # The TLS termination mechanism to use to access
# the services. Supported mechanism are: edge, passthrough # the services. Supported mechanism are: edge, passthrough
# #

View File

@@ -39,6 +39,12 @@ spec:
protocol: TCP protocol: TCP
targetPort: 8052 targetPort: 8052
name: http name: http
{% elif service_type | lower == "nodeport" %}
- port: {{ nodeport_port }}
protocol: TCP
targetPort: 8052
name: http
type: NodePort
{% endif %} {% endif %}
selector: selector:
app.kubernetes.io/name: '{{ meta.name }}' app.kubernetes.io/name: '{{ meta.name }}'
@@ -46,8 +52,6 @@ spec:
app.kubernetes.io/component: '{{ deployment_type }}' app.kubernetes.io/component: '{{ deployment_type }}'
{% if service_type | lower == "loadbalancer" %} {% if service_type | lower == "loadbalancer" %}
type: LoadBalancer type: LoadBalancer
{% elif service_type | lower == "nodeport" %}
type: NodePort
{% else %} {% else %}
type: ClusterIP type: ClusterIP
{% endif %} {% endif %}