diff --git a/README.md b/README.md index dd146265..04935c07 100644 --- a/README.md +++ b/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. -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 @@ -154,6 +154,23 @@ spec: 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 * Route diff --git a/ansible/templates/crd.yml.j2 b/ansible/templates/crd.yml.j2 index 1014ed3b..a678bd9e 100644 --- a/ansible/templates/crd.yml.j2 +++ b/ansible/templates/crd.yml.j2 @@ -69,6 +69,8 @@ spec: - route - LoadBalancer - loadbalancer + - NodePort + - nodeport tower_ingress_annotations: description: Annotations to add to the ingress type: string diff --git a/deploy/awx-operator.yaml b/deploy/awx-operator.yaml index 7803f2e9..5e815415 100644 --- a/deploy/awx-operator.yaml +++ b/deploy/awx-operator.yaml @@ -71,6 +71,8 @@ spec: - route - LoadBalancer - loadbalancer + - NodePort + - nodeport tower_ingress_annotations: description: Annotations to add to the ingress type: string diff --git a/deploy/crds/awx_v1beta1_crd.yaml b/deploy/crds/awx_v1beta1_crd.yaml index 8e8cc210..42efc911 100644 --- a/deploy/crds/awx_v1beta1_crd.yaml +++ b/deploy/crds/awx_v1beta1_crd.yaml @@ -69,6 +69,8 @@ spec: - route - LoadBalancer - loadbalancer + - NodePort + - nodeport tower_ingress_annotations: description: Annotations to add to the ingress type: string diff --git a/deploy/olm-catalog/awx-operator/manifests/awx-operator.clusterserviceversion.yaml b/deploy/olm-catalog/awx-operator/manifests/awx-operator.clusterserviceversion.yaml index f2f6d795..5b896faf 100644 --- a/deploy/olm-catalog/awx-operator/manifests/awx-operator.clusterserviceversion.yaml +++ b/deploy/olm-catalog/awx-operator/manifests/awx-operator.clusterserviceversion.yaml @@ -91,6 +91,7 @@ spec: - urn:alm:descriptor:com.tectonic.ui:select:Ingress - urn:alm:descriptor:com.tectonic.ui:select:Route - urn:alm:descriptor:com.tectonic.ui:select:LoadBalancer + - urn:alm:descriptor:com.tectonic.ui:select:NodePort - displayName: Tower Ingress Annotations path: tower_ingress_annotations x-descriptors: diff --git a/deploy/olm-catalog/awx-operator/manifests/awx.ansible.com_awxs_crd.yaml b/deploy/olm-catalog/awx-operator/manifests/awx.ansible.com_awxs_crd.yaml index adc89038..559cc885 100644 --- a/deploy/olm-catalog/awx-operator/manifests/awx.ansible.com_awxs_crd.yaml +++ b/deploy/olm-catalog/awx-operator/manifests/awx.ansible.com_awxs_crd.yaml @@ -106,6 +106,8 @@ spec: - route - LoadBalancer - loadbalancer + - NodePort + - nodeport type: string tower_loadbalancer_annotations: description: Annotations to add to the loadbalancer diff --git a/roles/installer/templates/tower_service.yaml.j2 b/roles/installer/templates/tower_service.yaml.j2 index 321a5909..3b41e229 100644 --- a/roles/installer/templates/tower_service.yaml.j2 +++ b/roles/installer/templates/tower_service.yaml.j2 @@ -44,6 +44,8 @@ spec: app.kubernetes.io/component: awx {% if tower_ingress_type | lower == "loadbalancer" %} type: LoadBalancer -{% elif tower_ingress_type != "none" %} +{% elif tower_ingress_type | lower == "nodeport" %} type: NodePort +{% else %} + type: ClusterIP {% endif %}