mirror of
https://github.com/ansible/awx-operator.git
synced 2026-05-07 22:02:53 +00:00
Merge pull request #204 from TheStally/devel
Set Service to use type ClusterIP instead of NodePort when tower_ingress_type is Ingress
This commit is contained in:
19
README.md
19
README.md
@@ -123,7 +123,7 @@ stringData:
|
|||||||
|
|
||||||
By default, the AWX operator is not opinionated and won't force a specific ingress type on you. So, if `tower_ingress_type` is not specified as part of the Custom Resource specification, 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, if `tower_ingress_type` is not specified as part of the Custom Resource specification, it will default to `none` and nothing ingress-wise will be created.
|
||||||
|
|
||||||
The AWX operator provides support for three kinds of `Ingress` to access AWX: `Ingress`, `Route` and `LoadBalancer`, To toggle between these options, you can add the following to your AWX CR:
|
The AWX operator provides support for four kinds of `Ingress` to access AWX: `Ingress`, `Route`, `LoadBalancer` and `NodePort`, To toggle between these options, you can add the following to your AWX CR:
|
||||||
|
|
||||||
* Route
|
* Route
|
||||||
|
|
||||||
@@ -154,6 +154,23 @@ spec:
|
|||||||
tower_loadbalancer_protocol: http
|
tower_loadbalancer_protocol: http
|
||||||
```
|
```
|
||||||
|
|
||||||
|
* NodePort
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
---
|
||||||
|
spec:
|
||||||
|
...
|
||||||
|
tower_ingress_type: NodePort
|
||||||
|
```
|
||||||
|
|
||||||
|
The AWX `Service` that gets created will have a `type` set based on the `tower_ingress_type` being used:
|
||||||
|
|
||||||
|
| Ingress Type `tower_ingress_type` | Service Type |
|
||||||
|
| ------------------------------------- | -------------- |
|
||||||
|
| `LoadBalancer` | `LoadBalancer` |
|
||||||
|
| `NodePort` | `NodePort` |
|
||||||
|
| `Ingress` or `Route` or not specified | `ClusterIP` |
|
||||||
|
|
||||||
#### TLS Termination
|
#### TLS Termination
|
||||||
|
|
||||||
* Route
|
* Route
|
||||||
|
|||||||
@@ -69,6 +69,8 @@ spec:
|
|||||||
- route
|
- route
|
||||||
- LoadBalancer
|
- LoadBalancer
|
||||||
- loadbalancer
|
- loadbalancer
|
||||||
|
- NodePort
|
||||||
|
- nodeport
|
||||||
tower_ingress_annotations:
|
tower_ingress_annotations:
|
||||||
description: Annotations to add to the ingress
|
description: Annotations to add to the ingress
|
||||||
type: string
|
type: string
|
||||||
|
|||||||
@@ -71,6 +71,8 @@ spec:
|
|||||||
- route
|
- route
|
||||||
- LoadBalancer
|
- LoadBalancer
|
||||||
- loadbalancer
|
- loadbalancer
|
||||||
|
- NodePort
|
||||||
|
- nodeport
|
||||||
tower_ingress_annotations:
|
tower_ingress_annotations:
|
||||||
description: Annotations to add to the ingress
|
description: Annotations to add to the ingress
|
||||||
type: string
|
type: string
|
||||||
|
|||||||
@@ -69,6 +69,8 @@ spec:
|
|||||||
- route
|
- route
|
||||||
- LoadBalancer
|
- LoadBalancer
|
||||||
- loadbalancer
|
- loadbalancer
|
||||||
|
- NodePort
|
||||||
|
- nodeport
|
||||||
tower_ingress_annotations:
|
tower_ingress_annotations:
|
||||||
description: Annotations to add to the ingress
|
description: Annotations to add to the ingress
|
||||||
type: string
|
type: string
|
||||||
|
|||||||
@@ -91,6 +91,7 @@ spec:
|
|||||||
- urn:alm:descriptor:com.tectonic.ui:select:Ingress
|
- urn:alm:descriptor:com.tectonic.ui:select:Ingress
|
||||||
- urn:alm:descriptor:com.tectonic.ui:select:Route
|
- urn:alm:descriptor:com.tectonic.ui:select:Route
|
||||||
- urn:alm:descriptor:com.tectonic.ui:select:LoadBalancer
|
- urn:alm:descriptor:com.tectonic.ui:select:LoadBalancer
|
||||||
|
- urn:alm:descriptor:com.tectonic.ui:select:NodePort
|
||||||
- displayName: Tower Ingress Annotations
|
- displayName: Tower Ingress Annotations
|
||||||
path: tower_ingress_annotations
|
path: tower_ingress_annotations
|
||||||
x-descriptors:
|
x-descriptors:
|
||||||
|
|||||||
@@ -106,6 +106,8 @@ spec:
|
|||||||
- route
|
- route
|
||||||
- LoadBalancer
|
- LoadBalancer
|
||||||
- loadbalancer
|
- loadbalancer
|
||||||
|
- NodePort
|
||||||
|
- nodeport
|
||||||
type: string
|
type: string
|
||||||
tower_loadbalancer_annotations:
|
tower_loadbalancer_annotations:
|
||||||
description: Annotations to add to the loadbalancer
|
description: Annotations to add to the loadbalancer
|
||||||
|
|||||||
@@ -44,6 +44,8 @@ spec:
|
|||||||
app.kubernetes.io/component: awx
|
app.kubernetes.io/component: awx
|
||||||
{% if tower_ingress_type | lower == "loadbalancer" %}
|
{% if tower_ingress_type | lower == "loadbalancer" %}
|
||||||
type: LoadBalancer
|
type: LoadBalancer
|
||||||
{% elif tower_ingress_type != "none" %}
|
{% elif tower_ingress_type | lower == "nodeport" %}
|
||||||
type: NodePort
|
type: NodePort
|
||||||
|
{% else %}
|
||||||
|
type: ClusterIP
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
Reference in New Issue
Block a user