mirror of
https://github.com/ansible/awx-operator.git
synced 2026-03-26 21:33:14 +00:00
Make tower_ingress_type to respect ClusterIP definition
This commit is contained in:
266
README.md
266
README.md
@@ -14,8 +14,8 @@ An [Ansible AWX](https://github.com/ansible/awx) operator for Kubernetes built w
|
||||
* [Basic Install](#basic-install)
|
||||
* [Admin user account configuration](#admin-user-account-configuration)
|
||||
* [Network and TLS Configuration](#network-and-tls-configuration)
|
||||
* [Service Type](#service-type)
|
||||
* [Ingress Type](#ingress-type)
|
||||
* [TLS Termination](#tls-termination)
|
||||
* [Database Configuration](#database-configuration)
|
||||
* [External PostgreSQL Service](#external-postgresql-service)
|
||||
* [Migrating data from an old AWX instance](#migrating-data-from-an-old-awx-instance)
|
||||
@@ -32,8 +32,9 @@ An [Ansible AWX](https://github.com/ansible/awx) operator for Kubernetes built w
|
||||
* [Upgrading](#upgrading)
|
||||
* [Contributing](#contributing)
|
||||
* [Release Process](#release-process)
|
||||
* [Build a new release](#build-a-new-release)
|
||||
* [Build a new version of the operator yaml file](#build-a-new-version-of-the-operator-yaml-file)
|
||||
* [Verifiy Functionality](#verify-functionality)
|
||||
* [Update Version](#update-version)
|
||||
* [Commit / Create Release](#commit--create-release)
|
||||
* [Author](#author)
|
||||
<!--te-->
|
||||
|
||||
@@ -41,7 +42,7 @@ An [Ansible AWX](https://github.com/ansible/awx) operator for Kubernetes built w
|
||||
|
||||
This operator is meant to provide a more Kubernetes-native installation method for AWX via an AWX Custom Resource Definition (CRD).
|
||||
|
||||
Note that the operator is not supported by Red Hat, and is in **alpha** status. For now, use it at your own risk!
|
||||
> :warning: The operator is not supported by Red Hat, and is in **alpha** status. For now, use it at your own risk!
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -49,40 +50,119 @@ Note that the operator is not supported by Red Hat, and is in **alpha** status.
|
||||
|
||||
This Kubernetes Operator is meant to be deployed in your Kubernetes cluster(s) and can manage one or more AWX instances in any namespace.
|
||||
|
||||
First, you need to deploy AWX Operator into your cluster. Start by going to https://github.com/ansible/awx-operator/releases and making note of the latest release.
|
||||
|
||||
Replace `<tag>` in the URL below with the version you are deploying:
|
||||
For testing purposes, the `awx-operator` can be deployed on a [Minikube](https://minikube.sigs.k8s.io/docs/) cluster. Due to different OS and hardware environments, please refer to the official Minikube documentation for further information.
|
||||
|
||||
```bash
|
||||
#> kubectl apply -f https://raw.githubusercontent.com/ansible/awx-operator/<tag>/deploy/awx-operator.yaml
|
||||
$ minikube start --addons=ingress --cpus=4 --cni=flannel --install-addons=true \
|
||||
--kubernetes-version=stable --memory=6g
|
||||
😄 minikube v1.20.0 on Fedora 34
|
||||
✨ Using the kvm2 driver based on user configuration
|
||||
👍 Starting control plane node minikube in cluster minikube
|
||||
🔥 Creating kvm2 VM (CPUs=4, Memory=6144MB, Disk=20000MB) ...
|
||||
🐳 Preparing Kubernetes v1.20.2 on Docker 20.10.6 ...
|
||||
▪ Generating certificates and keys ...
|
||||
▪ Booting up control plane ...
|
||||
▪ Configuring RBAC rules ...
|
||||
🔗 Configuring Flannel (Container Networking Interface) ...
|
||||
🔎 Verifying Kubernetes components...
|
||||
▪ Using image docker.io/jettech/kube-webhook-certgen:v1.5.1
|
||||
▪ Using image k8s.gcr.io/ingress-nginx/controller:v0.44.0
|
||||
▪ Using image gcr.io/k8s-minikube/storage-provisioner:v5
|
||||
▪ Using image docker.io/jettech/kube-webhook-certgen:v1.5.1
|
||||
🔎 Verifying ingress addon...
|
||||
🌟 Enabled addons: storage-provisioner, default-storageclass, ingress
|
||||
🏄 Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default
|
||||
```
|
||||
|
||||
Then create a file named `my-awx.yml` with the following contents:
|
||||
Once Minikube is deployed, check if the node(s) and `kube-apiserver` communication is working as expected.
|
||||
|
||||
```bash
|
||||
$ kubectl get nodes
|
||||
NAME STATUS ROLES AGE VERSION
|
||||
minikube Ready control-plane,master 6m28s v1.20.2
|
||||
|
||||
$ kubectl get pods -A
|
||||
NAMESPACE NAME READY STATUS RESTARTS AGE
|
||||
ingress-nginx ingress-nginx-admission-create-tjk94 0/1 Completed 0 6m4s
|
||||
ingress-nginx ingress-nginx-admission-patch-r4pl6 0/1 Completed 0 6m4s
|
||||
ingress-nginx ingress-nginx-controller-5d88495688-sbtp9 1/1 Running 0 6m4s
|
||||
kube-system coredns-74ff55c5b-2wz6n 1/1 Running 0 6m4s
|
||||
kube-system etcd-minikube 1/1 Running 0 6m13s
|
||||
kube-system kube-apiserver-minikube 1/1 Running 0 6m13s
|
||||
kube-system kube-controller-manager-minikube 1/1 Running 0 6m13s
|
||||
kube-system kube-flannel-ds-amd64-lw7lv 1/1 Running 0 6m3s
|
||||
kube-system kube-proxy-lcxx7 1/1 Running 0 6m3s
|
||||
kube-system kube-scheduler-minikube 1/1 Running 0 6m13s
|
||||
kube-system storage-provisioner 1/1 Running 1 6m17s
|
||||
```
|
||||
|
||||
Now you need to deploy AWX Operator into your cluster. Start by going to https://github.com/ansible/awx-operator/releases and making note of the latest release. Replace `<TAG>` in the URL `https://raw.githubusercontent.com/ansible/awx-operator/<TAG>/deploy/awx-operator.yaml` with the version you are deploying.
|
||||
|
||||
> For this example, we are using the `devel` tag which points to the latest nightly development version.
|
||||
|
||||
```bash
|
||||
$ kubectl apply -f https://raw.githubusercontent.com/ansible/awx-operator/devel/deploy/awx-operator.yaml
|
||||
customresourcedefinition.apiextensions.k8s.io/awxs.awx.ansible.com created
|
||||
customresourcedefinition.apiextensions.k8s.io/awxbackups.awx.ansible.com created
|
||||
customresourcedefinition.apiextensions.k8s.io/awxrestores.awx.ansible.com created
|
||||
clusterrole.rbac.authorization.k8s.io/awx-operator created
|
||||
clusterrolebinding.rbac.authorization.k8s.io/awx-operator created
|
||||
serviceaccount/awx-operator created
|
||||
deployment.apps/awx-operator created
|
||||
```
|
||||
|
||||
Wait a few minutes and you should have the `awx-operator` running.
|
||||
|
||||
```bash
|
||||
$ kubectl get pods
|
||||
NAME READY STATUS RESTARTS AGE
|
||||
awx-operator-7dbf9db9d7-z9hqx 1/1 Running 0 50s
|
||||
```
|
||||
|
||||
Then create a file named `awx-demo.yml` with the suggested content. The `metadata.name` you provide, will be the name of the resulting AWX deployment. If you deploy more than one AWX instance to the same namespace, be sure to use unique names.
|
||||
|
||||
```yaml
|
||||
---
|
||||
apiVersion: awx.ansible.com/v1beta1
|
||||
kind: AWX
|
||||
metadata:
|
||||
name: awx
|
||||
name: awx-demo
|
||||
spec:
|
||||
service_type: nodeport
|
||||
ingress_type: none
|
||||
hostname: awx-demo.example.com
|
||||
```
|
||||
|
||||
> The metadata.name you provide, will be the name of the resulting AWX deployment. If you deploy more than one to the same namespace, be sure to use unique names.
|
||||
|
||||
Finally, use `kubectl` to create the awx instance in your cluster:
|
||||
|
||||
```bash
|
||||
#> kubectl apply -f my-awx.yml
|
||||
$ kubectl apply -f awx-demo.yml
|
||||
awx.awx.ansible.com/awx-demo created
|
||||
```
|
||||
|
||||
After a few minutes, the new AWX instance will be deployed. One can look at the operator pod logs in order to know where the installation process is at. This can be done by running the following command: `kubectl logs -f deployments/awx-operator`.
|
||||
|
||||
Once deployed, the AWX instance will be accessible at `http://awx.mycompany.com/` (assuming your cluster has an Ingress controller configured).
|
||||
```bash
|
||||
$ kubectl get pods -l "app.kubernetes.io/managed-by=awx-operator"
|
||||
NAME READY STATUS RESTARTS AGE
|
||||
awx-demo-77d96f88d5-pnhr8 4/4 Running 0 3m24s
|
||||
awx-demo-postgres-0 1/1 Running 0 3m34s
|
||||
|
||||
$ kubectl get svc -l "app.kubernetes.io/managed-by=awx-operator"
|
||||
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
|
||||
awx-demo-postgres ClusterIP None <none> 5432/TCP 4m4s
|
||||
awx-demo-service NodePort 10.109.40.38 <none> 80:31006/TCP 3m56s
|
||||
```
|
||||
|
||||
Once deployed, the AWX instance will be accessible by the command `minikube service awx-demo-service --url`.
|
||||
|
||||
By default, the admin user is `admin` and the password is available in the `<resourcename>-admin-password` secret. To retrieve the admin password, run `kubectl get secret <resourcename>-admin-password -o jsonpath="{.data.password}" | base64 --decode`
|
||||
|
||||
You just completed the most basic install of an AWX instance via this operator. Congratulations!!!!
|
||||
|
||||
You just completed the most basic install of an AWX instance via this operator. Congratulations !
|
||||
For an example using the Nginx Controller in Minukube, don't miss our [demo video](https://asciinema.org/a/416946).
|
||||
|
||||
[](https://asciinema.org/a/416946)
|
||||
|
||||
### Admin user account configuration
|
||||
|
||||
@@ -117,93 +197,109 @@ stringData:
|
||||
|
||||
### Network and TLS Configuration
|
||||
|
||||
#### Ingress Type
|
||||
#### Service Type
|
||||
|
||||
By default, the AWX operator is not opinionated and won't force a specific ingress type on you. So, if `ingress_type` is not specified as part of the Custom Resource specification, it will default to `none` and nothing ingress-wise will be created.
|
||||
If the `service_type` is not specified, the `ClusterIP` service will be used for your AWX Tower service.
|
||||
|
||||
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:
|
||||
The `service_type` supported options are: `ClusterIP`, `LoadBalancer` and `NodePort`.
|
||||
|
||||
* Route
|
||||
|
||||
```yaml
|
||||
---
|
||||
spec:
|
||||
...
|
||||
ingress_type: Route
|
||||
```
|
||||
|
||||
* Ingress
|
||||
|
||||
```yaml
|
||||
---
|
||||
spec:
|
||||
...
|
||||
ingress_type: Ingress
|
||||
hostname: awx.mycompany.com
|
||||
```
|
||||
|
||||
* LoadBalancer
|
||||
|
||||
```yaml
|
||||
---
|
||||
spec:
|
||||
...
|
||||
ingress_type: LoadBalancer
|
||||
loadbalancer_protocol: http
|
||||
```
|
||||
|
||||
* NodePort
|
||||
|
||||
```yaml
|
||||
---
|
||||
spec:
|
||||
...
|
||||
ingress_type: NodePort
|
||||
```
|
||||
|
||||
The AWX `Service` that gets created will have a `type` set based on the `ingress_type` being used:
|
||||
|
||||
| Ingress Type `ingress_type` | Service Type |
|
||||
| ------------------------------------- | -------------- |
|
||||
| `LoadBalancer` | `LoadBalancer` |
|
||||
| `NodePort` | `NodePort` |
|
||||
| `Ingress` or `Route` or not specified | `ClusterIP` |
|
||||
|
||||
#### TLS Termination
|
||||
|
||||
* Route
|
||||
|
||||
The following variables are customizable to specify the TLS termination procedure when `Route` is picked as an Ingress
|
||||
The following variables are customizable for any `service_type`
|
||||
|
||||
| Name | Description | Default |
|
||||
| ------------------------------------- | --------------------------------------------- | --------------------------------- |
|
||||
| route_host | Common name the route answers for | Empty string |
|
||||
| route_tls_termination_mechanism | TLS Termination mechanism (Edge, Passthrough) | Edge |
|
||||
| route_tls_secret | Secret that contains the TLS information | Empty string |
|
||||
| service_labels | Add custom labels | Empty string |
|
||||
|
||||
* Ingress
|
||||
|
||||
The following variables are customizable to specify the TLS termination procedure when `Ingress` is picked as an Ingress
|
||||
|
||||
| Name | Description | Default |
|
||||
| -------------------------- | ---------------------------------------- | ------------- |
|
||||
| ingress_annotations | Ingress annotations | Empty string |
|
||||
| ingress_tls_secret | Secret that contains the TLS information | Empty string |
|
||||
```yaml
|
||||
---
|
||||
spec:
|
||||
...
|
||||
service_type: ClusterIP
|
||||
service_labels: |
|
||||
environment: testing
|
||||
```
|
||||
|
||||
* LoadBalancer
|
||||
|
||||
The following variables are customizable to specify the TLS termination procedure when `LoadBalancer` is picked as an Ingress
|
||||
The following variables are customizable only when `service_type=LoadBalancer`
|
||||
|
||||
| Name | Description | Default |
|
||||
| ------------------------------ | ---------------------------------------- | ------------- |
|
||||
| loadbalancer_annotations | LoadBalancer annotations | Empty string |
|
||||
| loadbalancer_protocol | Protocol to use for Loadbalancer ingress | http |
|
||||
| loadbalancer_port | Port used for Loadbalancer ingress | 80 |
|
||||
| loadbalancer_annotations | LoadBalancer annotations | Empty string |
|
||||
| loadbalancer_protocol | Protocol to use for Loadbalancer ingress | http |
|
||||
| loadbalancer_port | Port used for Loadbalancer ingress | 80 |
|
||||
|
||||
```yaml
|
||||
---
|
||||
spec:
|
||||
...
|
||||
service_type: LoadBalancer
|
||||
loadbalancer_protocol: https
|
||||
loadbalancer_port: 443
|
||||
loadbalancer_annotations: |
|
||||
environment: testing
|
||||
service_labels: |
|
||||
environment: testing
|
||||
```
|
||||
|
||||
When setting up a Load Balancer for HTTPS you will be required to set the `loadbalancer_port` to move the port away from `80`.
|
||||
|
||||
The HTTPS Load Balancer also uses SSL termination at the Load Balancer level and will offload traffic to AWX over HTTP.
|
||||
|
||||
#### 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.
|
||||
|
||||
The `ingress_type` supported options are: `none`, `ingress` and `route`. To toggle between these options, you can add the following to your AWX CRD:
|
||||
|
||||
* None
|
||||
|
||||
```yaml
|
||||
---
|
||||
spec:
|
||||
...
|
||||
ingress_type: none
|
||||
```
|
||||
|
||||
* Generic Ingress Controller
|
||||
|
||||
The following variables are customizable when `ingress_type=ingress`. The `ingress` type creates an Ingress resource as [documented](https://kubernetes.io/docs/concepts/services-networking/ingress/) which can be shared with many other Ingress Controllers as [listed](https://kubernetes.io/docs/concepts/services-networking/ingress-controllers/).
|
||||
|
||||
| Name | Description | Default |
|
||||
| -------------------------- | ---------------------------------------- | ---------------------------- |
|
||||
| ingress_annotations | Ingress annotations | Empty string |
|
||||
| ingress_tls_secret | Secret that contains the TLS information | Empty string |
|
||||
| hostname | Define the FQDN | {{ meta.name }}.example.com |
|
||||
|
||||
```yaml
|
||||
---
|
||||
spec:
|
||||
...
|
||||
ingress_type: ingress
|
||||
hostname: awx-demo.example.com
|
||||
ingress_annotations: |
|
||||
environment: testing
|
||||
```
|
||||
|
||||
* Route
|
||||
|
||||
The following variables are customizable when `ingress_type=route`
|
||||
|
||||
| Name | Description | Default |
|
||||
| ------------------------------------- | --------------------------------------------- | --------------------------------------------------------|
|
||||
| route_host | Common name the route answers for | `<instance-name>-<namespace>-<routerCanonicalHostname>` |
|
||||
| route_tls_termination_mechanism | TLS Termination mechanism (Edge, Passthrough) | Edge |
|
||||
| route_tls_secret | Secret that contains the TLS information | Empty string |
|
||||
|
||||
```yaml
|
||||
---
|
||||
spec:
|
||||
...
|
||||
ingress_type: route
|
||||
route_host: awx-demo.example.com
|
||||
route_tls_termination_mechanism: Passthrough
|
||||
route_tls_secret: custom-route-tls-secret-name
|
||||
```
|
||||
|
||||
### Database Configuration
|
||||
|
||||
#### External PostgreSQL Service
|
||||
@@ -572,7 +668,7 @@ There are a few moving parts to this project:
|
||||
2. The `awx-operator.yaml` Kubernetes manifest file which initially deploys the Operator into a cluster.
|
||||
3. Then use the command below to generate a list of commits between the versions.
|
||||
```sh
|
||||
#> git log --pretty="- %s (%an) - %h " <old_tag>..<new_tag> | grep -v Merge
|
||||
#> git log --no-merges --pretty="- %s (%an) - %h " <old_tag>..<new_tag>
|
||||
```
|
||||
|
||||
Each of these must be appropriately built in preparation for a new tag:
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
operator_image: quay.io/ansible/awx-operator
|
||||
operator_version: 0.9.0
|
||||
pull_policy: Always
|
||||
ansible_debug_logs: "false"
|
||||
|
||||
@@ -20,7 +20,8 @@
|
||||
spec:
|
||||
admin_user: admin
|
||||
admin_email: admin@localhost
|
||||
ingress_type: "{{ ingress_type | default(omit) }}" # Either Route, Ingress or LoadBalancer
|
||||
service_type: "{{ service_type | default(omit) }}" # Either clusterIP, Loadbalancer or NodePort
|
||||
ingress_type: "{{ ingress_type | default(omit) }}" # Either none, Ingress, Route
|
||||
image: "{{ image | default(omit) }}"
|
||||
image_version: "{{ image_version | default(omit) }}"
|
||||
development_mode: "{{ development_mode | default(omit) | bool }}"
|
||||
|
||||
@@ -70,6 +70,16 @@ spec:
|
||||
extra_volumes:
|
||||
description: Specify extra volumes to add to the application pod
|
||||
type: string
|
||||
service_type:
|
||||
description: The service type to be used on the deployed instance
|
||||
type: string
|
||||
enum:
|
||||
- LoadBalancer
|
||||
- loadbalancer
|
||||
- ClusterIP
|
||||
- clusterip
|
||||
- NodePort
|
||||
- nodeport
|
||||
ingress_type:
|
||||
description: The ingress type to use to reach the deployed instance
|
||||
type: string
|
||||
@@ -79,15 +89,11 @@ spec:
|
||||
- ingress
|
||||
- Route
|
||||
- route
|
||||
- LoadBalancer
|
||||
- loadbalancer
|
||||
- NodePort
|
||||
- nodeport
|
||||
ingress_annotations:
|
||||
description: Annotations to add to the ingress
|
||||
description: Annotations to add to the Ingress Controller
|
||||
type: string
|
||||
ingress_tls_secret:
|
||||
description: Secret where the ingress TLS secret can be found
|
||||
description: Secret where the Ingress TLS secret can be found
|
||||
type: string
|
||||
loadbalancer_annotations:
|
||||
description: Annotations to add to the loadbalancer
|
||||
|
||||
@@ -35,6 +35,8 @@ spec:
|
||||
value: explicit
|
||||
- name: OPERATOR_VERSION
|
||||
value: "{{ operator_version }}"
|
||||
- name: ANSIBLE_DEBUG_LOGS
|
||||
value: "{{ ansible_debug_logs|lower | default('false'|lower) }}"
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
|
||||
@@ -72,6 +72,16 @@ spec:
|
||||
extra_volumes:
|
||||
description: Specify extra volumes to add to the application pod
|
||||
type: string
|
||||
service_type:
|
||||
description: The service type to be used on the deployed instance
|
||||
type: string
|
||||
enum:
|
||||
- LoadBalancer
|
||||
- loadbalancer
|
||||
- ClusterIP
|
||||
- clusterip
|
||||
- NodePort
|
||||
- nodeport
|
||||
ingress_type:
|
||||
description: The ingress type to use to reach the deployed instance
|
||||
type: string
|
||||
@@ -81,15 +91,11 @@ spec:
|
||||
- ingress
|
||||
- Route
|
||||
- route
|
||||
- LoadBalancer
|
||||
- loadbalancer
|
||||
- NodePort
|
||||
- nodeport
|
||||
ingress_annotations:
|
||||
description: Annotations to add to the ingress
|
||||
description: Annotations to add to the Ingress Controller
|
||||
type: string
|
||||
ingress_tls_secret:
|
||||
description: Secret where the ingress TLS secret can be found
|
||||
description: Secret where the Ingress TLS secret can be found
|
||||
type: string
|
||||
loadbalancer_annotations:
|
||||
description: Annotations to add to the loadbalancer
|
||||
@@ -621,7 +627,7 @@ spec:
|
||||
serviceAccountName: awx-operator
|
||||
containers:
|
||||
- name: awx-operator
|
||||
image: "quay.io/ansible/awx-operator:0.9.0"
|
||||
image: "quay.io/ansible/awx-operator:devel"
|
||||
imagePullPolicy: "Always"
|
||||
volumeMounts:
|
||||
- mountPath: /tmp/ansible-operator/runner
|
||||
@@ -639,7 +645,9 @@ spec:
|
||||
- name: ANSIBLE_GATHERING
|
||||
value: explicit
|
||||
- name: OPERATOR_VERSION
|
||||
value: "0.9.0"
|
||||
value: "devel"
|
||||
- name: ANSIBLE_DEBUG_LOGS
|
||||
value: "false"
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
|
||||
@@ -70,6 +70,16 @@ spec:
|
||||
extra_volumes:
|
||||
description: Specify extra volumes to add to the application pod
|
||||
type: string
|
||||
service_type:
|
||||
description: The service type to be used on the deployed instance
|
||||
type: string
|
||||
enum:
|
||||
- LoadBalancer
|
||||
- loadbalancer
|
||||
- ClusterIP
|
||||
- clusterip
|
||||
- NodePort
|
||||
- nodeport
|
||||
ingress_type:
|
||||
description: The ingress type to use to reach the deployed instance
|
||||
type: string
|
||||
@@ -79,15 +89,11 @@ spec:
|
||||
- ingress
|
||||
- Route
|
||||
- route
|
||||
- LoadBalancer
|
||||
- loadbalancer
|
||||
- NodePort
|
||||
- nodeport
|
||||
ingress_annotations:
|
||||
description: Annotations to add to the ingress
|
||||
description: Annotations to add to the Ingress Controller
|
||||
type: string
|
||||
ingress_tls_secret:
|
||||
description: Secret where the ingress TLS secret can be found
|
||||
description: Secret where the Ingress TLS secret can be found
|
||||
type: string
|
||||
loadbalancer_annotations:
|
||||
description: Annotations to add to the loadbalancer
|
||||
|
||||
@@ -178,46 +178,51 @@ spec:
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- displayName: Ingress Type
|
||||
- displayName: Tower Service Type
|
||||
path: service_type
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:select:ClusterIP
|
||||
- urn:alm:descriptor:com.tectonic.ui:select:LoadBalancer
|
||||
- urn:alm:descriptor:com.tectonic.ui:select:NodePort
|
||||
- displayName: Tower Ingress Type
|
||||
path: ingress_type
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:select:none
|
||||
- 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: Ingress Annotations
|
||||
- displayName: Tower Ingress Annotations
|
||||
path: ingress_annotations
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:ingress_type:Ingress
|
||||
- displayName: Ingress TLS Secret
|
||||
- displayName: Tower Ingress TLS Secret
|
||||
path: ingress_tls_secret
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:io.kubernetes:Secret
|
||||
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:ingress_type:Ingress
|
||||
- displayName: LoadBalancer Annotations
|
||||
- displayName: Tower LoadBalancer Annotations
|
||||
path: loadbalancer_annotations
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:ingress_type:LoadBalancer
|
||||
- displayName: LoadBalancer Protocol
|
||||
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:service_type:LoadBalancer
|
||||
- displayName: Tower LoadBalancer Protocol
|
||||
path: loadbalancer_protocol
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:select:http
|
||||
- urn:alm:descriptor:com.tectonic.ui:select:https
|
||||
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:ingress_type:LoadBalancer
|
||||
- displayName: LoadBalancer Port
|
||||
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:service_type:LoadBalancer
|
||||
- displayName: Tower LoadBalancer Port
|
||||
path: loadbalancer_port
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:number
|
||||
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:ingress_type:LoadBalancer
|
||||
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:service_type:LoadBalancer
|
||||
- displayName: Route DNS host
|
||||
path: route_host
|
||||
x-descriptors:
|
||||
|
||||
1
docs/awx-demo.svg
Normal file
1
docs/awx-demo.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 825 KiB |
@@ -28,6 +28,7 @@
|
||||
pull_policy: Never
|
||||
operator_image: awx.ansible.com/awx-operator
|
||||
operator_version: testing
|
||||
ansible_debug_logs: "true"
|
||||
custom_resource: "{{ lookup('file', '/'.join([deploy_dir, 'crds/awx_v1beta1_molecule.yaml'])) | from_yaml }}"
|
||||
|
||||
tasks:
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
pull_policy: Never
|
||||
operator_image: awx.ansible.com/awx-operator
|
||||
operator_version: testing
|
||||
ansible_debug_logs: "true"
|
||||
# Change this to _awx to test AWX, _tower to test Tower.
|
||||
custom_resource: "{{ lookup('file', '/'.join([deploy_dir, 'crds/awx_v1beta1_molecule.yaml'])) | from_yaml }}"
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ database_name: "{{ deployment_type }}"
|
||||
database_username: "{{ deployment_type }}"
|
||||
|
||||
task_privileged: false
|
||||
service_type: ClusterIP
|
||||
ingress_type: none
|
||||
|
||||
# Add annotations to the service account. Specify as literal block. E.g.:
|
||||
@@ -51,7 +52,7 @@ route_tls_secret: ''
|
||||
#
|
||||
route_host: ''
|
||||
|
||||
hostname: '{{ deployment_type }}.example.com'
|
||||
hostname: '{{ meta.name }}.example.com'
|
||||
|
||||
# Add a nodeSelector for the AWX pods. It must match a node's labels for the pod
|
||||
# to be scheduled on that node. Specify as literal block. E.g.:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{% if 'ingress' == ingress_type|lower %}
|
||||
{% if ingress_type|lower == "ingress" %}
|
||||
---
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Ingress
|
||||
@@ -32,7 +32,7 @@ spec:
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if 'route' == ingress_type|lower %}
|
||||
{% if ingress_type|lower == "route" %}
|
||||
---
|
||||
apiVersion: route.openshift.io/v1
|
||||
kind: Route
|
||||
|
||||
@@ -17,7 +17,7 @@ metadata:
|
||||
{% endif %}
|
||||
spec:
|
||||
ports:
|
||||
{% if ingress_type | lower != 'loadbalancer' and loadbalancer_protocol | lower != 'https' %}
|
||||
{% if service_type | lower != 'loadbalancer' and loadbalancer_protocol | lower != 'https' %}
|
||||
- port: 80
|
||||
protocol: TCP
|
||||
targetPort: 8052
|
||||
@@ -29,12 +29,12 @@ spec:
|
||||
targetPort: 8053
|
||||
name: https
|
||||
{% endif %}
|
||||
{% if ingress_type | lower == 'loadbalancer' and loadbalancer_protocol | lower == 'https' %}
|
||||
{% if service_type | lower == 'loadbalancer' and loadbalancer_protocol | lower == 'https' %}
|
||||
- port: {{ loadbalancer_port }}
|
||||
protocol: TCP
|
||||
targetPort: 8052
|
||||
name: https
|
||||
{% elif ingress_type | lower == 'loadbalancer' and loadbalancer_protocol | lower != 'https' %}
|
||||
{% elif service_type | lower == 'loadbalancer' and loadbalancer_protocol | lower != 'https' %}
|
||||
- port: {{ loadbalancer_port }}
|
||||
protocol: TCP
|
||||
targetPort: 8052
|
||||
@@ -44,9 +44,9 @@ spec:
|
||||
app.kubernetes.io/name: '{{ meta.name }}'
|
||||
app.kubernetes.io/managed-by: '{{ deployment_type }}-operator'
|
||||
app.kubernetes.io/component: '{{ deployment_type }}'
|
||||
{% if ingress_type | lower == "loadbalancer" %}
|
||||
{% if service_type | lower == "loadbalancer" %}
|
||||
type: LoadBalancer
|
||||
{% elif ingress_type != "none" %}
|
||||
{% elif service_type | lower == "nodeport" %}
|
||||
type: NodePort
|
||||
{% else %}
|
||||
type: ClusterIP
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
##
|
||||
## git clone https://github.com/ansible/awx-operator.git
|
||||
## cd awx-operator
|
||||
## REGISTRY=registry.example.com/ansible TAG=mytag scripts/build.sh
|
||||
## REGISTRY=registry.example.com/ansible TAG=mytag ANSIBLE_DEBUG_LOGS=true scripts/build.sh
|
||||
##
|
||||
## As a result, the $REGISTRY will be populated with 2 images
|
||||
## registry.example.com/ansible/awx-operator:mytag
|
||||
@@ -51,6 +51,7 @@ prepare_local_deploy() {
|
||||
echo "operator_image: $REGISTRY/$OPERATOR_IMAGE" > ansible/group_vars/all
|
||||
echo "operator_version: $TAG" >> ansible/group_vars/all
|
||||
echo "pull_policy: Always" >> ansible/group_vars/all
|
||||
echo "ansible_debug_logs: ${ANSIBLE_DEBUG_LOGS:-false}" >> ansible/group_vars/all
|
||||
ansible-playbook ansible/chain-operator-files.yml
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user