mirror of
https://github.com/ansible/awx-operator.git
synced 2026-03-27 13:53:12 +00:00
Compare commits
58 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ca6ab0a380 | ||
|
|
236bce6970 | ||
|
|
58ac0cc369 | ||
|
|
c3ac2e2cde | ||
|
|
589a3751e1 | ||
|
|
12a58d71fb | ||
|
|
6b873b05ab | ||
|
|
5e97ff7c08 | ||
|
|
86c31a4317 | ||
|
|
487727b454 | ||
|
|
2f47b907fd | ||
|
|
dbaf64efa0 | ||
|
|
5375fec77d | ||
|
|
9980192d9e | ||
|
|
e2fc5f46c0 | ||
|
|
5b3be06e8d | ||
|
|
3c2405f304 | ||
|
|
192611eea8 | ||
|
|
9ca14cef93 | ||
|
|
fbc2d3475c | ||
|
|
58f30fb96c | ||
|
|
c81b78aad6 | ||
|
|
c02e05925e | ||
|
|
479c009716 | ||
|
|
7807bc516e | ||
|
|
3afcd7fd89 | ||
|
|
7002131dda | ||
|
|
877943cc27 | ||
|
|
b59a0c5b80 | ||
|
|
26b1eb6c87 | ||
|
|
39437da72b | ||
|
|
e1645a2f8d | ||
|
|
224dde769a | ||
|
|
536d7dc842 | ||
|
|
eac2328bd3 | ||
|
|
3be986c96c | ||
|
|
768bc2f857 | ||
|
|
f05faaaaa0 | ||
|
|
957566993b | ||
|
|
c95f3299b0 | ||
|
|
1a0e3cf410 | ||
|
|
9368b43614 | ||
|
|
108addc06e | ||
|
|
3a3260ffb7 | ||
|
|
960d1f8a32 | ||
|
|
4d8f84eb74 | ||
|
|
1320c9d175 | ||
|
|
fab71e054e | ||
|
|
3eede3c922 | ||
|
|
d27ce3c34d | ||
|
|
18d17f2485 | ||
|
|
47d3ef57f2 | ||
|
|
8f8336b25a | ||
|
|
5b636bb8ea | ||
|
|
79152d2417 | ||
|
|
c843194cbd | ||
|
|
b0824acc48 | ||
|
|
38ec4a3b00 |
3
.github/issue_labeler.yml
vendored
Normal file
3
.github/issue_labeler.yml
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
---
|
||||
needs_triage:
|
||||
- '.*'
|
||||
3
.github/workflows/stage.yml
vendored
3
.github/workflows/stage.yml
vendored
@@ -60,7 +60,8 @@ jobs:
|
||||
- name: Build and stage awx-operator
|
||||
working-directory: awx-operator
|
||||
run: |
|
||||
BUILD_ARGS="--build-arg DEFAULT_AWX_VERSION=${{ github.event.inputs.default_awx_version }}" \
|
||||
BUILD_ARGS="--build-arg DEFAULT_AWX_VERSION=${{ github.event.inputs.default_awx_version }} \
|
||||
--build-arg OPERATOR_VERSION=${{ github.event.inputs.version }}" \
|
||||
IMAGE_TAG_BASE=ghcr.io/${{ github.repository_owner }}/awx-operator \
|
||||
VERSION=${{ github.event.inputs.version }} make docker-build docker-push
|
||||
|
||||
|
||||
22
.github/workflows/triage_new.yml
vendored
Normal file
22
.github/workflows/triage_new.yml
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
---
|
||||
name: Triage
|
||||
|
||||
on:
|
||||
issues:
|
||||
types:
|
||||
- opened
|
||||
|
||||
jobs:
|
||||
triage:
|
||||
runs-on: ubuntu-latest
|
||||
name: Label
|
||||
|
||||
steps:
|
||||
- name: Label issues
|
||||
uses: github/issue-labeler@v2.4.1
|
||||
with:
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
not-before: 2021-12-07T07:00:00Z
|
||||
configuration-path: .github/issue_labeler.yml
|
||||
enable-versioned-regex: 0
|
||||
if: github.event_name == 'issues'
|
||||
@@ -2,7 +2,14 @@
|
||||
|
||||
This is a list of high-level changes for each release of `awx-operator`. A full list of commits can be found at `https://github.com/ansible/awx-operator/releases/tag/<version>`.
|
||||
|
||||
# 0.14.0 (TBA)
|
||||
# 0.19.0 (Mar 23, 2022)
|
||||
|
||||
- Fix corrupted spec for the service with nodeport type (kurokobo) - dbaf64e
|
||||
- Add ability to deploy with OLM & added logo (Christian Adams) - 86c31a4
|
||||
- Fix backup & restore issues with special characters in the postgres password (kurokobo) - 589a375
|
||||
- Use centos:stream8 container where applicable (Shane McDonald)- 12a58d7
|
||||
|
||||
# 0.14.0 (Oct 03, 2021)
|
||||
|
||||
- Starting with awx-operator 0.14.0, the project is now based on operator-sdk 1.x.
|
||||
- To avoid a headache, you probably want to delete your existing operator Deployment and follow the README.
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
FROM quay.io/operator-framework/ansible-operator:v1.12.0
|
||||
|
||||
ARG DEFAULT_AWX_VERSION
|
||||
ARG OPERATOR_VERSION
|
||||
ENV DEFAULT_AWX_VERSION=${DEFAULT_AWX_VERSION}
|
||||
ENV OPERATOR_VERSION=${OPERATOR_VERSION}
|
||||
|
||||
COPY requirements.yml ${HOME}/requirements.yml
|
||||
RUN ansible-galaxy collection install -r ${HOME}/requirements.yml \
|
||||
|
||||
4
Makefile
4
Makefile
@@ -89,10 +89,11 @@ deploy: kustomize ## Deploy controller to the K8s cluster specified in ~/.kube/c
|
||||
@$(KUSTOMIZE) build config/default | kubectl apply -f -
|
||||
|
||||
undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/config.
|
||||
@cd config/default && $(KUSTOMIZE) edit set namespace ${NAMESPACE}
|
||||
$(KUSTOMIZE) build config/default | kubectl delete -f -
|
||||
|
||||
OS := $(shell uname -s | tr '[:upper:]' '[:lower:]')
|
||||
ARCH := $(shell uname -m | sed 's/x86_64/amd64/')
|
||||
ARCH := $(shell uname -m | sed -e 's/x86_64/amd64/' -e 's/aarch64/arm64/')
|
||||
|
||||
.PHONY: kustomize
|
||||
KUSTOMIZE = $(shell pwd)/bin/kustomize
|
||||
@@ -131,7 +132,6 @@ bundle: kustomize ## Generate bundle manifests and metadata, then validate gener
|
||||
operator-sdk generate kustomize manifests -q
|
||||
cd config/manager && $(KUSTOMIZE) edit set image controller=$(IMG)
|
||||
$(KUSTOMIZE) build config/manifests | operator-sdk generate bundle -q --overwrite --version $(VERSION) $(BUNDLE_METADATA_OPTS)
|
||||
cd config/manifests/bases && python inject-csv-config.py
|
||||
operator-sdk bundle validate ./bundle
|
||||
|
||||
.PHONY: bundle-build
|
||||
|
||||
263
README.md
263
README.md
@@ -11,7 +11,8 @@ An [Ansible AWX](https://github.com/ansible/awx) operator for Kubernetes built w
|
||||
* [Table of Contents](#table-of-contents)
|
||||
* [Purpose](#purpose)
|
||||
* [Usage](#usage)
|
||||
* [Basic Install](#basic-install)
|
||||
* [Basic Install on minikube (beginner or testing)](#basic-install-on-minikube-beginner-or-testing)
|
||||
* [Basic Install on existing cluster](#basic-install-on-existing-cluster)
|
||||
* [Admin user account configuration](#admin-user-account-configuration)
|
||||
* [Network and TLS Configuration](#network-and-tls-configuration)
|
||||
* [Service Type](#service-type)
|
||||
@@ -22,21 +23,22 @@ An [Ansible AWX](https://github.com/ansible/awx) operator for Kubernetes built w
|
||||
* [Managed PostgreSQL Service](#managed-postgresql-service)
|
||||
* [Advanced Configuration](#advanced-configuration)
|
||||
* [Deploying a specific version of AWX](#deploying-a-specific-version-of-awx)
|
||||
* [Redis container capabilities](#redis-container-capabilities)
|
||||
* [Privileged Tasks](#privileged-tasks)
|
||||
* [Containers Resource Requirements](#containers-resource-requirements)
|
||||
* [Assigning AWX pods to specific nodes](#assigning-awx-pods-to-specific-nodes)
|
||||
* [Trusting a Custom Certificate Authority](#trusting-a-custom-certificate-authority)
|
||||
* [Persisting Projects Directory](#persisting-projects-directory)
|
||||
* [Custom Volume and Volume Mount Options](#custom-volume-and-volume-mount-options)
|
||||
* [Default execution environments from private registries](#default-execution-environments-from-private-registries)
|
||||
* [Exporting Environment Variables to Containers](#exporting-environment-variables-to-containers)
|
||||
* [Extra Settings](#extra-settings)
|
||||
* [Service Account](#service-account)
|
||||
* [Uninstall](#uninstall)
|
||||
* [Upgrading](#upgrading)
|
||||
* [Upgrading](#upgrading)
|
||||
* [v0.14.0](#v0140)
|
||||
* [Contributing](#contributing)
|
||||
* [Release Process](#release-process)
|
||||
* [Verifiy Functionality](#verify-functionality)
|
||||
* [Update Version](#update-version)
|
||||
* [Commit / Create Release](#commit--create-release)
|
||||
* [Author](#author)
|
||||
<!--te-->
|
||||
|
||||
@@ -46,7 +48,7 @@ This operator is meant to provide a more Kubernetes-native installation method f
|
||||
|
||||
## Usage
|
||||
|
||||
### Basic Install
|
||||
### Basic Install on minikube (beginner or testing)
|
||||
|
||||
This Kubernetes Operator is meant to be deployed in your Kubernetes cluster(s) and can manage one or more AWX instances in any namespace.
|
||||
|
||||
@@ -104,23 +106,22 @@ Now you need to deploy AWX Operator into your cluster. Clone this repo and `git
|
||||
```
|
||||
$ export NAMESPACE=my-namespace
|
||||
$ make deploy
|
||||
cd config/manager && /home/user/awx-operator/bin/kustomize edit set image controller=quay.io/ansible/awx-operator:0.14.0
|
||||
/home/user/awx-operator/bin/kustomize build config/default | kubectl apply -f -
|
||||
namespace/my-namespace created
|
||||
customresourcedefinition.apiextensions.k8s.io/awxbackups.awx.ansible.com created
|
||||
customresourcedefinition.apiextensions.k8s.io/awxrestores.awx.ansible.com created
|
||||
customresourcedefinition.apiextensions.k8s.io/awxs.awx.ansible.com created
|
||||
serviceaccount/awx-operator-controller-manager created
|
||||
role.rbac.authorization.k8s.io/awx-operator-leader-election-role created
|
||||
role.rbac.authorization.k8s.io/awx-operator-manager-role created
|
||||
clusterrole.rbac.authorization.k8s.io/awx-operator-metrics-reader created
|
||||
clusterrole.rbac.authorization.k8s.io/awx-operator-proxy-role created
|
||||
rolebinding.rbac.authorization.k8s.io/awx-operator-leader-election-rolebinding created
|
||||
rolebinding.rbac.authorization.k8s.io/awx-operator-manager-rolebinding created
|
||||
clusterrolebinding.rbac.authorization.k8s.io/awx-operator-proxy-rolebinding created
|
||||
configmap/awx-operator-manager-config created
|
||||
service/awx-operator-controller-manager-metrics-service created
|
||||
deployment.apps/awx-operator-controller-manager created
|
||||
/home/user/awx-operator/bin/kustomize build config/default | kubectl apply -f -
|
||||
namespace/my-namespace created
|
||||
customresourcedefinition.apiextensions.k8s.io/awxbackups.awx.ansible.com created
|
||||
customresourcedefinition.apiextensions.k8s.io/awxrestores.awx.ansible.com created
|
||||
customresourcedefinition.apiextensions.k8s.io/awxs.awx.ansible.com created
|
||||
serviceaccount/awx-operator-controller-manager created
|
||||
role.rbac.authorization.k8s.io/awx-operator-leader-election-role created
|
||||
role.rbac.authorization.k8s.io/awx-operator-manager-role created
|
||||
clusterrole.rbac.authorization.k8s.io/awx-operator-metrics-reader created
|
||||
clusterrole.rbac.authorization.k8s.io/awx-operator-proxy-role created
|
||||
rolebinding.rbac.authorization.k8s.io/awx-operator-leader-election-rolebinding created
|
||||
rolebinding.rbac.authorization.k8s.io/awx-operator-manager-rolebinding created
|
||||
clusterrolebinding.rbac.authorization.k8s.io/awx-operator-proxy-rolebinding created
|
||||
configmap/awx-operator-manager-config created
|
||||
service/awx-operator-controller-manager-metrics-service created
|
||||
deployment.apps/awx-operator-controller-manager created
|
||||
```
|
||||
|
||||
Wait a bit and you should have the `awx-operator` running:
|
||||
@@ -137,6 +138,8 @@ So we don't have to keep repeating `-n $NAMESPACE`, let's set the current namesp
|
||||
$ kubectl config set-context --current --namespace=$NAMESPACE
|
||||
```
|
||||
|
||||
It is important to know that when you do not set the default namespace to $NAMESPACE that the `awx-operator-controller-manager` might get confused.
|
||||
|
||||
Next, create a file named `awx-demo.yml` with the suggested content below. The `metadata.name` you provide, will be the name of the resulting AWX deployment.
|
||||
|
||||
**Note:** If you deploy more than one AWX instance to the same namespace, be sure to use unique names.
|
||||
@@ -157,6 +160,12 @@ Finally, use `kubectl` to create the awx instance in your cluster:
|
||||
$ kubectl apply -f awx-demo.yml
|
||||
awx.awx.ansible.com/awx-demo created
|
||||
```
|
||||
Or, when you haven't set a default namespace
|
||||
|
||||
```
|
||||
$ kubectl apply -f awx-demo.yml --namespace=$NAMESPACE
|
||||
awx.awx.ansible.com/awx-demo created
|
||||
```
|
||||
|
||||
After a few minutes, the new AWX instance will be deployed. You can look at the operator pod logs in order to know where the installation process is at:
|
||||
|
||||
@@ -197,15 +206,30 @@ For an example using the Nginx Controller in Minukube, don't miss our [demo vide
|
||||
|
||||
[](https://asciinema.org/a/416946)
|
||||
|
||||
### Basic Install on existing cluster
|
||||
|
||||
For those running a whole K8S Cluster the steps to set up the awx-operator are:
|
||||
|
||||
```
|
||||
$ Prepare required files
|
||||
git clone https://github.com/ansible/awx-operator.git
|
||||
cd awx-operator
|
||||
git checkout {{ latest_released_version }} # replace variable by latest version number in releases
|
||||
|
||||
$ Deploy new AWX Operator
|
||||
export NAMESPACE=<Name of the namespace where your AWX instanse exists>
|
||||
make deploy
|
||||
```
|
||||
|
||||
### Admin user account configuration
|
||||
|
||||
There are three variables that are customizable for the admin user account creation.
|
||||
|
||||
| Name | Description | Default |
|
||||
| --------------------------- | -------------------------------------------- | ---------------- |
|
||||
| admin_user | Name of the admin user | admin |
|
||||
| admin_email | Email of the admin user | test@example.com |
|
||||
| admin_password_secret | Secret that contains the admin user password | Empty string |
|
||||
| Name | Description | Default |
|
||||
| --------------------- | -------------------------------------------- | ---------------- |
|
||||
| admin_user | Name of the admin user | admin |
|
||||
| admin_email | Email of the admin user | test@example.com |
|
||||
| admin_password_secret | Secret that contains the admin user password | Empty string |
|
||||
|
||||
|
||||
> :warning: **admin_password_secret must be a Kubernetes secret and not your text clear password**.
|
||||
@@ -238,15 +262,18 @@ The `service_type` supported options are: `ClusterIP`, `LoadBalancer` and `NodeP
|
||||
|
||||
The following variables are customizable for any `service_type`
|
||||
|
||||
| Name | Description | Default |
|
||||
| ------------------------------------- | --------------------------------------------- | --------------------------------- |
|
||||
| service_labels | Add custom labels | Empty string |
|
||||
| Name | Description | Default |
|
||||
| ------------------- | ----------------------- | ------------ |
|
||||
| service_labels | Add custom labels | Empty string |
|
||||
| service_annotations | Add service annotations | Empty string |
|
||||
|
||||
```yaml
|
||||
---
|
||||
spec:
|
||||
...
|
||||
service_type: ClusterIP
|
||||
service_annotations: |
|
||||
environment: testing
|
||||
service_labels: |
|
||||
environment: testing
|
||||
```
|
||||
@@ -255,11 +282,10 @@ spec:
|
||||
|
||||
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 |
|
||||
| Name | Description | Default |
|
||||
| --------------------- | ---------------------------------------- | ------- |
|
||||
| loadbalancer_protocol | Protocol to use for Loadbalancer ingress | http |
|
||||
| loadbalancer_port | Port used for Loadbalancer ingress | 80 |
|
||||
|
||||
```yaml
|
||||
---
|
||||
@@ -268,7 +294,7 @@ spec:
|
||||
service_type: LoadBalancer
|
||||
loadbalancer_protocol: https
|
||||
loadbalancer_port: 443
|
||||
loadbalancer_annotations: |
|
||||
service_annotations: |
|
||||
environment: testing
|
||||
service_labels: |
|
||||
environment: testing
|
||||
@@ -282,9 +308,9 @@ The HTTPS Load Balancer also uses SSL termination at the Load Balancer level and
|
||||
|
||||
The following variables are customizable only when `service_type=NodePort`
|
||||
|
||||
| Name | Description | Default |
|
||||
| ------------------------------ | ---------------------------------------- | ------------- |
|
||||
| nodeport_port | Port used for NodePort | 30080 |
|
||||
| Name | Description | Default |
|
||||
| ------------- | ---------------------- | ------- |
|
||||
| nodeport_port | Port used for NodePort | 30080 |
|
||||
|
||||
```yaml
|
||||
---
|
||||
@@ -312,13 +338,13 @@ spec:
|
||||
|
||||
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 |
|
||||
| ingress_path | Define the ingress path to the service | / |
|
||||
| ingress_path_type | Define the type of the path (for LBs) | Prefix |
|
||||
| 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 |
|
||||
| ingress_path | Define the ingress path to the service | / |
|
||||
| ingress_path_type | Define the type of the path (for LBs) | Prefix |
|
||||
|
||||
```yaml
|
||||
---
|
||||
@@ -334,8 +360,8 @@ spec:
|
||||
|
||||
The following variables are customizable when `ingress_type=route`
|
||||
|
||||
| Name | Description | Default |
|
||||
| ------------------------------------- | --------------------------------------------- | --------------------------------------------------------|
|
||||
| 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 |
|
||||
@@ -377,7 +403,7 @@ stringData:
|
||||
type: Opaque
|
||||
```
|
||||
|
||||
> Please ensure that the value for the variable "password" is wrapped in quotes if the password contains any special characters.
|
||||
> Please ensure that the value for the variable `password` should _not_ contain single or double quotes (`'`, `"`) or backslashes (`\`) to avoid any issues during deployment, backup or restoration.
|
||||
|
||||
> It is possible to set a specific username, password, port, or database, but still have the database managed by the operator. In this case, when creating the postgres-configuration secret, the `type: managed` field should be added.
|
||||
|
||||
@@ -393,13 +419,14 @@ If you don't have access to an external PostgreSQL service, the AWX operator can
|
||||
|
||||
The following variables are customizable for the managed PostgreSQL service
|
||||
|
||||
| Name | Description | Default |
|
||||
| ------------------------------------ | ------------------------------------------ | --------------------------------- |
|
||||
| postgres_image | Path of the image to pull | postgres:12 |
|
||||
| postgres_resource_requirements | PostgreSQL container resource requirements | Empty object |
|
||||
| postgres_storage_requirements | PostgreSQL container storage requirements | requests: {storage: 8Gi} |
|
||||
| postgres_storage_class | PostgreSQL PV storage class | Empty string |
|
||||
| postgres_data_path | PostgreSQL data path | `/var/lib/postgresql/data/pgdata` |
|
||||
| Name | Description | Default |
|
||||
| --------------------------------------------- | --------------------------------------------- | --------------------------------- |
|
||||
| postgres_image | Path of the image to pull | postgres:12 |
|
||||
| postgres_init_container_resource_requirements | Database init container resource requirements | requests: {} |
|
||||
| postgres_resource_requirements | PostgreSQL container resource requirements | requests: {} |
|
||||
| postgres_storage_requirements | PostgreSQL container storage requirements | requests: {storage: 8Gi} |
|
||||
| postgres_storage_class | PostgreSQL PV storage class | Empty string |
|
||||
| postgres_data_path | PostgreSQL data path | `/var/lib/postgresql/data/pgdata` |
|
||||
|
||||
Example of customization could be:
|
||||
|
||||
@@ -433,15 +460,15 @@ spec:
|
||||
|
||||
There are a few variables that are customizable for awx the image management.
|
||||
|
||||
| Name | Description |
|
||||
| --------------------------| -------------------------- |
|
||||
| image | Path of the image to pull |
|
||||
| image_version | Image version to pull |
|
||||
| image_pull_policy | The pull policy to adopt |
|
||||
| image_pull_secret | The pull secret to use |
|
||||
| ee_images | A list of EEs to register |
|
||||
| redis_image | Path of the image to pull |
|
||||
| redis_image_version | Image version to pull |
|
||||
| Name | Description |
|
||||
| ------------------- | ------------------------- |
|
||||
| image | Path of the image to pull |
|
||||
| image_version | Image version to pull |
|
||||
| image_pull_policy | The pull policy to adopt |
|
||||
| image_pull_secret | The pull secret to use |
|
||||
| ee_images | A list of EEs to register |
|
||||
| redis_image | Path of the image to pull |
|
||||
| redis_image_version | Image version to pull |
|
||||
|
||||
Example of customization could be:
|
||||
|
||||
@@ -498,11 +525,11 @@ Again, this is the most relaxed SCC that is provided by OpenShift, so be sure to
|
||||
|
||||
The resource requirements for both, the task and the web containers are configurable - both the lower end (requests) and the upper end (limits).
|
||||
|
||||
| Name | Description | Default |
|
||||
| -------------------------------- | ------------------------------------------------ | ----------------------------------- |
|
||||
| web_resource_requirements | Web container resource requirements | requests: {cpu: 1000m, memory: 2Gi} |
|
||||
| task_resource_requirements | Task container resource requirements | requests: {cpu: 500m, memory: 1Gi} |
|
||||
| ee_resource_requirements | EE control plane container resource requirements | requests: {cpu: 500m, memory: 1Gi} |
|
||||
| Name | Description | Default |
|
||||
| -------------------------- | ------------------------------------------------ | ----------------------------------- |
|
||||
| web_resource_requirements | Web container resource requirements | requests: {cpu: 1000m, memory: 2Gi} |
|
||||
| task_resource_requirements | Task container resource requirements | requests: {cpu: 500m, memory: 1Gi} |
|
||||
| ee_resource_requirements | EE control plane container resource requirements | requests: {cpu: 500m, memory: 1Gi} |
|
||||
|
||||
Example of customization could be:
|
||||
|
||||
@@ -541,15 +568,16 @@ pods to be scheduled onto nodes with matching taints.
|
||||
The ability to specify topologySpreadConstraints is also allowed through `topology_spread_constraints`
|
||||
|
||||
|
||||
| Name | Description | Default |
|
||||
| -------------------------------| ---------------------------------------- | ------- |
|
||||
| postgres_image | Path of the image to pull | 12 |
|
||||
| postgres_image_version | Image version to pull | 12 |
|
||||
| node_selector | AWX pods' nodeSelector | '' |
|
||||
| topology_spread_constraints | AWX pods' topologySpreadConstraints | '' |
|
||||
| tolerations | AWX pods' tolerations | '' |
|
||||
| postgres_selector | Postgres pods' nodeSelector | '' |
|
||||
| postgres_tolerations | Postgres pods' tolerations | '' |
|
||||
| Name | Description | Default |
|
||||
| --------------------------- | ----------------------------------- | ------- |
|
||||
| postgres_image | Path of the image to pull | 12 |
|
||||
| postgres_image_version | Image version to pull | 12 |
|
||||
| node_selector | AWX pods' nodeSelector | '' |
|
||||
| topology_spread_constraints | AWX pods' topologySpreadConstraints | '' |
|
||||
| tolerations | AWX pods' tolerations | '' |
|
||||
| annotations | AWX pods' annotations | '' |
|
||||
| postgres_selector | Postgres pods' nodeSelector | '' |
|
||||
| postgres_tolerations | Postgres pods' tolerations | '' |
|
||||
|
||||
Example of customization could be:
|
||||
|
||||
@@ -591,10 +619,10 @@ In cases which you need to trust a custom Certificate Authority, there are few v
|
||||
Trusting a custom Certificate Authority allows the AWX to access network services configured with SSL certificates issued locally, such as cloning a project from from an internal Git server via HTTPS. It is common for these scenarios, experiencing the error [unable to verify the first certificate](https://github.com/ansible/awx-operator/issues/376).
|
||||
|
||||
|
||||
| Name | Description | Default |
|
||||
| -------------------------------- | ---------------------------------------- | --------|
|
||||
| ldap_cacert_secret | LDAP Certificate Authority secret name | '' |
|
||||
| bundle_cacert_secret | Certificate Authority secret name | '' |
|
||||
| Name | Description | Default |
|
||||
| -------------------- | -------------------------------------- | ------- |
|
||||
| ldap_cacert_secret | LDAP Certificate Authority secret name | '' |
|
||||
| bundle_cacert_secret | Certificate Authority secret name | '' |
|
||||
|
||||
Please note the `awx-operator` will look for the data field `ldap-ca.crt` in the specified secret when using the `ldap_cacert_secret`, whereas the data field `bundle-ca.crt` is required for `bundle_cacert_secret` parameter.
|
||||
|
||||
@@ -620,13 +648,13 @@ To create the secret, you can use the command below:
|
||||
|
||||
In cases which you want to persist the `/var/lib/projects` directory, there are few variables that are customizable for the `awx-operator`.
|
||||
|
||||
| Name | Description | Default |
|
||||
| -----------------------------------| ---------------------------------------------------------------------------------------------------- | ---------------|
|
||||
| projects_persistence | Whether or not the /var/lib/projects directory will be persistent | false |
|
||||
| projects_storage_class | Define the PersistentVolume storage class | '' |
|
||||
| projects_storage_size | Define the PersistentVolume size | 8Gi |
|
||||
| projects_storage_access_mode | Define the PersistentVolume access mode | ReadWriteMany |
|
||||
| projects_existing_claim | Define an existing PersistentVolumeClaim to use (cannot be combined with `projects_storage_*`) | '' |
|
||||
| Name | Description | Default |
|
||||
| ---------------------------- | ---------------------------------------------------------------------------------------------- | ------------- |
|
||||
| projects_persistence | Whether or not the /var/lib/projects directory will be persistent | false |
|
||||
| projects_storage_class | Define the PersistentVolume storage class | '' |
|
||||
| projects_storage_size | Define the PersistentVolume size | 8Gi |
|
||||
| projects_storage_access_mode | Define the PersistentVolume access mode | ReadWriteMany |
|
||||
| projects_existing_claim | Define an existing PersistentVolumeClaim to use (cannot be combined with `projects_storage_*`) | '' |
|
||||
|
||||
Example of customization when the `awx-operator` automatically handles the persistent volume could be:
|
||||
|
||||
@@ -643,14 +671,14 @@ spec:
|
||||
|
||||
In a scenario where custom volumes and volume mounts are required to either overwrite defaults or mount configuration files.
|
||||
|
||||
| Name | Description | Default |
|
||||
| --------------------------------- | -------------------------------------------------------- | ------- |
|
||||
| extra_volumes | Specify extra volumes to add to the application pod | '' |
|
||||
| web_extra_volume_mounts | Specify volume mounts to be added to Web container | '' |
|
||||
| task_extra_volume_mounts | Specify volume mounts to be added to Task container | '' |
|
||||
| ee_extra_volume_mounts | Specify volume mounts to be added to Execution container | '' |
|
||||
| init_container_extra_volume_mounts| Specify volume mounts to be added to Init container | '' |
|
||||
| init_container_extra_commands | Specify additional commands for Init container | '' |
|
||||
| Name | Description | Default |
|
||||
| ---------------------------------- | -------------------------------------------------------- | ------- |
|
||||
| extra_volumes | Specify extra volumes to add to the application pod | '' |
|
||||
| web_extra_volume_mounts | Specify volume mounts to be added to Web container | '' |
|
||||
| task_extra_volume_mounts | Specify volume mounts to be added to Task container | '' |
|
||||
| ee_extra_volume_mounts | Specify volume mounts to be added to Execution container | '' |
|
||||
| init_container_extra_volume_mounts | Specify volume mounts to be added to Init container | '' |
|
||||
| init_container_extra_commands | Specify additional commands for Init container | '' |
|
||||
|
||||
|
||||
> :warning: The `ee_extra_volume_mounts` and `extra_volumes` will only take effect to the globally available Execution Environments. For custom `ee`, please [customize the Pod spec](https://docs.ansible.com/ansible-tower/latest/html/administration/external_execution_envs.html#customize-the-pod-spec).
|
||||
@@ -771,11 +799,11 @@ type: kubernetes.io/dockerconfigjson
|
||||
|
||||
If you need to export custom environment variables to your containers.
|
||||
|
||||
| Name | Description | Default |
|
||||
| ----------------------------- | -------------------------------------------------------- | ------- |
|
||||
| task_extra_env | Environment variables to be added to Task container | '' |
|
||||
| web_extra_env | Environment variables to be added to Web container | '' |
|
||||
| ee_extra_env | Environment variables to be added to EE container | '' |
|
||||
| Name | Description | Default |
|
||||
| -------------- | --------------------------------------------------- | ------- |
|
||||
| task_extra_env | Environment variables to be added to Task container | '' |
|
||||
| web_extra_env | Environment variables to be added to Web container | '' |
|
||||
| ee_extra_env | Environment variables to be added to EE container | '' |
|
||||
|
||||
> :warning: The `ee_extra_env` will only take effect to the globally available Execution Environments. For custom `ee`, please [customize the Pod spec](https://docs.ansible.com/ansible-tower/latest/html/administration/external_execution_envs.html#customize-the-pod-spec).
|
||||
|
||||
@@ -798,9 +826,9 @@ Example configuration of environment variables
|
||||
|
||||
With`extra_settings`, you can pass multiple custom settings via the `awx-operator`. The parameter `extra_settings` will be appended to the `/etc/tower/settings.py` and can be an alternative to the `extra_volumes` parameter.
|
||||
|
||||
| Name | Description | Default |
|
||||
| ----------------------------- | -------------------------------------------------------- | ------- |
|
||||
| extra_settings | Extra settings | '' |
|
||||
| Name | Description | Default |
|
||||
| -------------- | -------------- | ------- |
|
||||
| extra_settings | Extra settings | '' |
|
||||
|
||||
Example configuration of `extra_settings` parameter
|
||||
|
||||
@@ -818,9 +846,9 @@ Example configuration of `extra_settings` parameter
|
||||
|
||||
If you need to modify some `ServiceAccount` proprieties
|
||||
|
||||
| Name | Description | Default |
|
||||
| ----------------------------- | -------------------------------------------------------- | ------- |
|
||||
| service_account_annotations | Annotations to the ServiceAccount | '' |
|
||||
| Name | Description | Default |
|
||||
| --------------------------- | --------------------------------- | ------- |
|
||||
| service_account_annotations | Annotations to the ServiceAccount | '' |
|
||||
|
||||
Example configuration of environment variables
|
||||
|
||||
@@ -859,6 +887,21 @@ delete your existing `awx-operator` service account, role and role binding.
|
||||
|
||||
Starting with awx-operator 0.14.0, the project is now based on operator-sdk 1.x. You may need to manually delete your old operator Deployment to avoid issues.
|
||||
|
||||
##### Steps to upgrade
|
||||
|
||||
Delete your old AWX Operator and existing `awx-operator` service account, role and role binding in `default` namespace first:
|
||||
|
||||
```
|
||||
$ kubectl -n default delete deployment awx-operator
|
||||
$ kubectl -n default delete serviceaccount awx-operator
|
||||
$ kubectl -n default delete clusterrolebinding awx-operator
|
||||
$ kubectl -n default delete clusterrole awx-operator
|
||||
```
|
||||
|
||||
Then install the new AWX Operator by following the instructions in [Basic Install](#basic-install-on-existing-cluster). The `NAMESPACE` environment variable have to be the name of the namespace in which your old AWX instance resides.
|
||||
|
||||
Once the new AWX Operator is up and running, your AWX deployment will also be upgraded.
|
||||
|
||||
## Contributing
|
||||
|
||||
Please visit [our contributing guidelines](https://github.com/ansible/awx-operator/blob/devel/CONTRIBUTING.md).
|
||||
|
||||
@@ -67,6 +67,9 @@ spec:
|
||||
extra_volumes:
|
||||
description: Specify extra volumes to add to the application pod
|
||||
type: string
|
||||
service_annotations:
|
||||
description: Annotations to add to the service
|
||||
type: string
|
||||
service_type:
|
||||
description: The service type to be used on the deployed instance
|
||||
type: string
|
||||
@@ -98,9 +101,6 @@ spec:
|
||||
ingress_tls_secret:
|
||||
description: Secret where the Ingress TLS secret can be found
|
||||
type: string
|
||||
loadbalancer_annotations:
|
||||
description: Annotations to add to the loadbalancer
|
||||
type: string
|
||||
loadbalancer_protocol:
|
||||
description: Protocol to use for the loadbalancer
|
||||
type: string
|
||||
@@ -140,6 +140,9 @@ spec:
|
||||
service_labels:
|
||||
description: Additional labels to apply to the service
|
||||
type: string
|
||||
annotations:
|
||||
description: annotations for the pods
|
||||
type: string
|
||||
tolerations:
|
||||
description: node tolerations for the pods
|
||||
type: string
|
||||
@@ -245,6 +248,28 @@ spec:
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
postgres_init_container_resource_requirements:
|
||||
description: Resource requirements for the postgres init container
|
||||
properties:
|
||||
requests:
|
||||
properties:
|
||||
cpu:
|
||||
type: string
|
||||
memory:
|
||||
type: string
|
||||
storage:
|
||||
type: string
|
||||
type: object
|
||||
limits:
|
||||
properties:
|
||||
cpu:
|
||||
type: string
|
||||
memory:
|
||||
type: string
|
||||
storage:
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
service_account_annotations:
|
||||
description: ServiceAccount annotations
|
||||
type: string
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,24 +0,0 @@
|
||||
'''
|
||||
After generating the CSV file, inject custom configuration such as
|
||||
OLM parameters, relatedImages, etc.
|
||||
'''
|
||||
|
||||
import yaml
|
||||
|
||||
csv_path = "../../../bundle/manifests/awx-operator.clusterserviceversion.yaml"
|
||||
existing_csv = open(csv_path, 'r')
|
||||
csv = yaml.safe_load(existing_csv)
|
||||
|
||||
|
||||
raw_olm_params = open("olm-parameters.yaml")
|
||||
olm_params = yaml.safe_load(raw_olm_params)
|
||||
|
||||
# Inject OLM parameters for Customer Resource Objects
|
||||
csv['spec']['customresourcedefinitions']['owned'] = olm_params
|
||||
|
||||
csv['metadata']['annotations']['alm-examples'] = ''
|
||||
|
||||
file_content = yaml.safe_dump(csv, default_flow_style=False, explicit_start=True)
|
||||
|
||||
with open(csv_path, 'w') as f:
|
||||
f.write(file_content)
|
||||
@@ -1,599 +0,0 @@
|
||||
---
|
||||
- displayName: AWX Backup
|
||||
description: Back up a deployment of the awx, including jobs, inventories, and credentials
|
||||
kind: AWXBackup
|
||||
name: awxbackups.awx.ansible.com
|
||||
version: v1beta1
|
||||
specDescriptors:
|
||||
- displayName: Deployment name
|
||||
path: deployment_name
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- displayName: Backup persistent volume claim
|
||||
path: backup_pvc
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- displayName: Backup persistent volume claim namespace
|
||||
path: backup_pvc_namespace
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- displayName: Backup PVC storage requirements
|
||||
path: backup_storage_requirements
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- displayName: Backup PVC storage class
|
||||
path: backup_storage_class
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- displayName: Database backup label selector
|
||||
path: postgres_label_selector
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: PostgreSQL Image
|
||||
path: postgres_image
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: PostgreSQL Image Version
|
||||
path: postgres_image_version
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
statusDescriptors:
|
||||
- description: The persistent volume claim name used during backup
|
||||
displayName: Backup claim
|
||||
path: backupClaim
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- description: The directory data is backed up to on the PVC
|
||||
displayName: Backup directory
|
||||
path: backupDirectory
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- displayName: AWX Restore
|
||||
description: Restore a previous awx deployment into the namespace
|
||||
kind: AWXRestore
|
||||
name: awxrestores.awx.ansible.com
|
||||
version: v1beta1
|
||||
specDescriptors:
|
||||
- displayName: Backup source to restore ?
|
||||
path: backup_source
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:select:CR
|
||||
- urn:alm:descriptor:com.tectonic.ui:select:PVC
|
||||
- displayName: Backup name
|
||||
path: backup_name
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:backup_source:CR
|
||||
- displayName: Name of newly restored deployment
|
||||
path: deployment_name
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- displayName: Backup persistent volume claim
|
||||
path: backup_pvc
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:backup_source:PVC
|
||||
- displayName: Backup namespace
|
||||
path: backup_pvc_namespace
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- displayName: Backup directory in the persistent volume claim
|
||||
path: backup_dir
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:backup_source:PVC
|
||||
- displayName: Database restore label selector
|
||||
path: postgres_label_selector
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: PostgreSQL Image
|
||||
path: postgres_image
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: PostgreSQL Image Version
|
||||
path: postgres_image_version
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
statusDescriptors:
|
||||
- description: The state of the restore
|
||||
displayName: Restore status
|
||||
path: restoreComplete
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- description: Deploy a new instance of AWX
|
||||
displayName: AWX
|
||||
kind: AWX
|
||||
name: awxs.awx.ansible.com
|
||||
version: v1beta1
|
||||
specDescriptors:
|
||||
- displayName: Hostname
|
||||
path: hostname
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- displayName: Admin account username
|
||||
path: admin_user
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- displayName: Admin email address
|
||||
path: admin_email
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- displayName: Admin password secret
|
||||
path: admin_password_secret
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:io.kubernetes:Secret
|
||||
- displayName: Database configuration secret
|
||||
path: postgres_configuration_secret
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:io.kubernetes:Secret
|
||||
- displayName: Old Database configuration secret
|
||||
path: old_postgres_configuration_secret
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:io.kubernetes:Secret
|
||||
- displayName: Secret key secret
|
||||
path: secret_key_secret
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:io.kubernetes:Secret
|
||||
- displayName: Broadcast Websocket Secret
|
||||
path: broadcast_websocket_secret
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:io.kubernetes:Secret
|
||||
- displayName: Service Account Annotations
|
||||
path: service_account_annotations
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- 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
|
||||
- displayName: Ingress Path
|
||||
path: ingress_path
|
||||
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 Path Type
|
||||
path: ingress_path_type
|
||||
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: 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: 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: 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: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: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:service_type:LoadBalancer
|
||||
- displayName: Route DNS host
|
||||
path: route_host
|
||||
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:Route
|
||||
- displayName: Route TLS termination mechanism
|
||||
path: route_tls_termination_mechanism
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:select:Edge
|
||||
- urn:alm:descriptor:com.tectonic.ui:select:Passthrough
|
||||
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:ingress_type:Route
|
||||
- displayName: Route TLS credential secret
|
||||
path: route_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:Route
|
||||
- displayName: Image Pull Policy
|
||||
path: image_pull_policy
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:imagePullPolicy
|
||||
- displayName: Image Pull Secret
|
||||
path: image_pull_secret
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:io.kubernetes:Secret
|
||||
- displayName: Web container resource requirements
|
||||
path: web_resource_requirements
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:resourceRequirements
|
||||
- displayName: Task container resource requirements
|
||||
path: task_resource_requirements
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:resourceRequirements
|
||||
- displayName: EE Control Plane container resource requirements
|
||||
path: ee_resource_requirements
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:resourceRequirements
|
||||
- displayName: PostgreSQL container resource requirements (when using a managed
|
||||
instance)
|
||||
path: postgres_resource_requirements
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:resourceRequirements
|
||||
- displayName: PostgreSQL container storage requirements (when using a managed
|
||||
instance)
|
||||
path: postgres_storage_requirements
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:resourceRequirements
|
||||
- displayName: Replicas
|
||||
path: replicas
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:number
|
||||
- displayName: Remove used secrets on instance removal ?
|
||||
path: garbage_collect_secrets
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:booleanSwitch
|
||||
- displayName: Preload instance with data upon creation ?
|
||||
path: create_preload_data
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:booleanSwitch
|
||||
- displayName: Deploy the instance in development mode ?
|
||||
path: development_mode
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:booleanSwitch
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: Should the task container deployed with privileged level ?
|
||||
path: task_privileged
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:booleanSwitch
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: Deployment Type
|
||||
path: deployment_type
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: Deployment Kind
|
||||
path: kind
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: Deployment apiVersion
|
||||
path: api_version
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: Image
|
||||
path: image
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: Image Version
|
||||
path: image_version
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: Redis Image
|
||||
path: redis_image
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: Redis Image Version
|
||||
path: redis_image_version
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: Redis Capabilities
|
||||
path: redis_capabilities
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: PostgreSQL Image
|
||||
path: postgres_image
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: PostgreSQL Image Version
|
||||
path: postgres_image_version
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: Postgres Selector
|
||||
path: postgres_selector
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: Postgres Label Selector
|
||||
path: postgres_label_selector
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: Postgres Tolerations
|
||||
path: postgres_tolerations
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: Postgres Storage Class
|
||||
path: postgres_storage_class
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: Postgres Datapath
|
||||
path: postgres_data_path
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: Certificate Authorirty Trust Bundle
|
||||
path: ca_trust_bundle
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: LDAP Certificate Authority Trust Bundle
|
||||
path: ldap_cacert_secret
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:io.kubernetes:Secret
|
||||
- displayName: Task Args
|
||||
path: task_args
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: Enable persistence for /var/lib/projects directory?
|
||||
path: projects_persistence
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:booleanSwitch
|
||||
- displayName: Use existing Persistent Claim?
|
||||
path: projects_use_existing_claim
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:select:_Yes_
|
||||
- urn:alm:descriptor:com.tectonic.ui:select:_No_
|
||||
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:projects_persistence:true
|
||||
- displayName: Projects Existing Persistent Claim
|
||||
path: projects_existing_claim
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:projects_use_existing_claim:_Yes_
|
||||
- urn:alm:descriptor:io.kubernetes:PersistentVolumeClaim
|
||||
- description: Projects Storage Class Name. If not present, the default storage
|
||||
class will be used.
|
||||
displayName: Projects Storage Class Name
|
||||
path: projects_storage_class
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:projects_use_existing_claim:_No_
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- description: Projects Storage Size
|
||||
displayName: Projects Storage Size
|
||||
path: projects_storage_size
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:projects_use_existing_claim:_No_
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- description: Projects Storage Access Mode
|
||||
displayName: Projects Storage Access Mode
|
||||
path: projects_storage_access_mode
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:projects_use_existing_claim:_No_
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- displayName: Task Command
|
||||
path: task_command
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- description: Environment variables to be added to Task container
|
||||
displayName: Task Extra Env
|
||||
path: task_extra_env
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- description: Specify volume mounts to be added to Execution container
|
||||
displayName: EE Extra Volume Mounts
|
||||
path: ee_extra_volume_mounts
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- description: Registry path to the Execution Environment container to use
|
||||
displayName: EE Images
|
||||
path: ee_images
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- description: Environment variables to be added to EE container
|
||||
displayName: EE Extra Env
|
||||
path: ee_extra_env
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- description: Registry path to the Execution Environment container to use on
|
||||
control plane pods
|
||||
displayName: Control Plane EE Image
|
||||
path: control_plane_ee_image
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- description: EE Images Pull Credentials Secret
|
||||
displayName: EE Images Pull Credentials Secret
|
||||
path: ee_pull_credentials_secret
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:io.kubernetes:Secret
|
||||
- description: Specify volume mounts to be added to Task container
|
||||
displayName: Task Extra Volume Mounts
|
||||
path: task_extra_volume_mounts
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: Web Args
|
||||
path: web_args
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: Web Command
|
||||
path: web_command
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- description: Environment variables to be added to Web container
|
||||
displayName: Web Extra Env
|
||||
path: web_extra_env
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- description: Specify volume mounts to be added to Web container
|
||||
displayName: Web Extra Volume Mounts
|
||||
path: web_extra_volume_mounts
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- description: Specify extra volumes to add to the application pod
|
||||
displayName: Extra Volumes
|
||||
path: extra_volumes
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: Node Selector
|
||||
path: node_selector
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: Topology Spread Constraints
|
||||
path: topology_spread_constraints
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: Service Labels
|
||||
path: service_labels
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: Tolerations
|
||||
path: tolerations
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: API Extra Settings
|
||||
path: extra_settings
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: Security Context Settings
|
||||
path: security_context_settings
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- description: Registry path to the init container to use
|
||||
displayName: Init Container Image
|
||||
path: init_container_image
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- description: Init container image version to use
|
||||
displayName: Init Container Image Version
|
||||
path: init_container_image_version
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- description: Specify Extra commands for the Init container
|
||||
displayName: Init Container Extra Commands
|
||||
path: init_container_extra_commands
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- description: Specify volume mounts to be added to Init container
|
||||
displayName: Init Container Extra Volume Mounts
|
||||
path: init_container_extra_volume_mounts
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- description: Secret where can be found the trusted Certificate Authority Bundle
|
||||
path: bundle_cacert_secret
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:io.kubernetes:Secret
|
||||
- displayName: Nodeport Port
|
||||
path: nodeport_port
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
statusDescriptors:
|
||||
- description: Route to access the instance deployed
|
||||
displayName: URL
|
||||
path: URL
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:org.w3:link
|
||||
- description: Admin user for the instance deployed
|
||||
displayName: Admin User
|
||||
path: adminUser
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- description: Admin password for the instance deployed
|
||||
displayName: Admin Password
|
||||
path: adminPasswordSecret
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:io.kubernetes:Secret
|
||||
- description: Version of the instance deployed
|
||||
displayName: Version
|
||||
path: version
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- description: Image of the instance deployed
|
||||
displayName: Image
|
||||
path: image
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
@@ -55,7 +55,7 @@
|
||||
rescue:
|
||||
- name: Get list of project updates and jobs
|
||||
uri:
|
||||
url: "http://localhost/api/v2/{{ item }}/"
|
||||
url: "http://localhost/api/v2/{{ resource }}/"
|
||||
user: admin
|
||||
password: "{{ admin_pw_secret.resources[0].data.password | b64decode }}"
|
||||
force_basic_auth: yes
|
||||
@@ -63,15 +63,19 @@
|
||||
loop:
|
||||
- project_updates
|
||||
- jobs
|
||||
loop_control:
|
||||
loop_var: resource
|
||||
|
||||
- name: Get all job and project details
|
||||
uri:
|
||||
url: "http://localhost{{ item }}"
|
||||
url: "http://localhost{{ endpoint }}"
|
||||
user: admin
|
||||
password: "{{ admin_pw_secret.resources[0].data.password | b64decode }}"
|
||||
force_basic_auth: yes
|
||||
loop: |
|
||||
{{ job_lists.results | map(attribute='json') | map(attribute='results') | flatten | map(attribute='url') }}
|
||||
loop_control:
|
||||
loop_var: endpoint
|
||||
|
||||
- name: Re-emit failure
|
||||
vars:
|
||||
|
||||
@@ -2,6 +2,6 @@ molecule
|
||||
molecule-docker
|
||||
yamllint
|
||||
ansible-lint
|
||||
openshift
|
||||
openshift!=0.13.0
|
||||
jmespath
|
||||
ansible-core
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
command: |
|
||||
bash -c """
|
||||
set -e -o pipefail
|
||||
PGPASSWORD={{ awx_postgres_pass }} {{ pgdump }} > {{ backup_dir }}/tower.db
|
||||
PGPASSWORD='{{ awx_postgres_pass }}' {{ pgdump }} > {{ backup_dir }}/tower.db
|
||||
echo 'Successful'
|
||||
"""
|
||||
register: data_migration
|
||||
|
||||
@@ -36,7 +36,7 @@ ingress_tls_secret: ''
|
||||
|
||||
loadbalancer_protocol: 'http'
|
||||
loadbalancer_port: '80'
|
||||
loadbalancer_annotations: ''
|
||||
service_annotations: ''
|
||||
|
||||
nodeport_port: '30080'
|
||||
# The TLS termination mechanism to use to access
|
||||
@@ -83,6 +83,12 @@ topology_spread_constraints: ''
|
||||
# effect: "NoSchedule"
|
||||
tolerations: ''
|
||||
|
||||
# Add annotations to awx pods. Specify as literal block. E.g.:
|
||||
# annotations: |
|
||||
# my.annotation/1: value
|
||||
# my.annotation/2: value2
|
||||
annotations: ''
|
||||
|
||||
admin_user: admin
|
||||
admin_email: test@example.com
|
||||
|
||||
@@ -125,7 +131,7 @@ _redis_image_version: latest
|
||||
_postgres_image: postgres
|
||||
_postgres_image_version: 12
|
||||
_init_container_image: quay.io/centos/centos
|
||||
_init_container_image_version: 8
|
||||
_init_container_image_version: stream8
|
||||
image_pull_policy: IfNotPresent
|
||||
image_pull_secret: ''
|
||||
|
||||
@@ -216,6 +222,7 @@ postgres_tolerations: ''
|
||||
postgres_storage_requirements:
|
||||
requests:
|
||||
storage: 8Gi
|
||||
postgres_init_container_resource_requirements: {}
|
||||
postgres_resource_requirements: {}
|
||||
postgres_data_path: '/var/lib/postgresql/data/pgdata'
|
||||
|
||||
|
||||
@@ -157,6 +157,10 @@
|
||||
retries: 60
|
||||
when: pg_config['resources'][0]['data']['type'] | default('') | b64decode == 'managed'
|
||||
|
||||
- name: Set database as managed
|
||||
set_fact:
|
||||
managed_database: "{{ pg_config['resources'][0]['data']['type'] | default('') | b64decode == 'managed' }}"
|
||||
|
||||
- name: Look up details for this deployment
|
||||
k8s_info:
|
||||
api_version: "{{ api_version }}"
|
||||
|
||||
@@ -36,6 +36,9 @@
|
||||
- name: Include broadcast websocket configuration tasks
|
||||
include_tasks: broadcast_websocket_configuration.yml
|
||||
|
||||
- name: Include set_images tasks
|
||||
include_tasks: set_images.yml
|
||||
|
||||
- name: Include database configuration tasks
|
||||
include_tasks: database_configuration.yml
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
command: |
|
||||
bash -c """
|
||||
set -e -o pipefail
|
||||
PGPASSWORD={{ awx_old_postgres_pass }} {{ pgdump }} | PGPASSWORD={{ awx_postgres_pass }} {{ pg_restore }}
|
||||
PGPASSWORD='{{ awx_old_postgres_pass }}' {{ pgdump }} | PGPASSWORD='{{ awx_postgres_pass }}' {{ pg_restore }}
|
||||
echo 'Successful'
|
||||
"""
|
||||
no_log: true
|
||||
|
||||
@@ -47,24 +47,6 @@
|
||||
set_fact:
|
||||
_image: "{{ _custom_image | default(lookup('env', 'RELATED_IMAGE_AWX')) | default(_default_image, true) }}"
|
||||
|
||||
- name: Set default awx init container image
|
||||
set_fact:
|
||||
_default_init_container_image: "{{ _init_container_image }}:{{ _init_container_image_version }}"
|
||||
|
||||
- name: Set user provided awx init image
|
||||
set_fact:
|
||||
_custom_init_container_image: "{{ init_container_image }}:{{ init_container_image_version }}"
|
||||
when:
|
||||
- init_container_image | default([]) | length
|
||||
- init_container_image_version is defined or init_container_image_version != ''
|
||||
|
||||
- name: Set Init image URL
|
||||
set_fact:
|
||||
_init_container_image: |
|
||||
{{ _custom_init_container_image |
|
||||
default(lookup('env', 'RELATED_IMAGE_AWX_INIT_CONTAINER')) |
|
||||
default(_default_init_container_image, true) }}
|
||||
|
||||
- name: Set default redis image
|
||||
set_fact:
|
||||
_default_redis_image: "{{ _redis_image }}:{{ _redis_image_version }}"
|
||||
|
||||
19
roles/installer/tasks/set_images.yml
Normal file
19
roles/installer/tasks/set_images.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
# For disconnected environments, images must be set based on the values of `RELATED_IMAGE_` variables
|
||||
---
|
||||
- name: Set default awx init container image
|
||||
set_fact:
|
||||
_default_init_container_image: "{{ _init_container_image }}:{{ _init_container_image_version }}"
|
||||
|
||||
- name: Set user provided awx init image
|
||||
set_fact:
|
||||
_custom_init_container_image: "{{ init_container_image }}:{{ init_container_image_version }}"
|
||||
when:
|
||||
- init_container_image | default([]) | length
|
||||
- init_container_image_version is defined or init_container_image_version != ''
|
||||
|
||||
- name: Set Init image URL
|
||||
set_fact:
|
||||
_init_container_image: >-
|
||||
{{ _custom_init_container_image |
|
||||
default(lookup('env', 'RELATED_IMAGE_AWX_INIT_CONTAINER')) |
|
||||
default(_default_init_container_image, true) }}
|
||||
@@ -18,6 +18,7 @@ data:
|
||||
settings: |
|
||||
import os
|
||||
import socket
|
||||
from django_auth_ldap.config import LDAPSearch
|
||||
|
||||
def get_secret():
|
||||
if os.path.exists("/etc/tower/SECRET_KEY"):
|
||||
@@ -25,11 +26,22 @@ data:
|
||||
|
||||
ADMINS = ()
|
||||
STATIC_ROOT = '/var/lib/awx/public/static'
|
||||
STATIC_URL = '{{ (ingress_path + '/static/').replace('//', '/') }}'
|
||||
PROJECTS_ROOT = '/var/lib/awx/projects'
|
||||
JOBOUTPUT_ROOT = '/var/lib/awx/job_status'
|
||||
|
||||
IS_K8S = True
|
||||
|
||||
# Set memory available based off of resource request/limit for the task pod
|
||||
memory_limit = '{{ task_resource_requirements["limits"]["memory"] if "limits" in task_resource_requirements and "memory" in task_resource_requirements["limits"] }}'
|
||||
if memory_limit:
|
||||
SYSTEM_TASK_ABS_MEM = memory_limit
|
||||
|
||||
# Set cpu available based off of resource request/limit for the task pod
|
||||
cpu_limit = '{{ task_resource_requirements["limits"]["cpu"] if "limits" in task_resource_requirements and "cpu" in task_resource_requirements["limits"] }}'
|
||||
if cpu_limit:
|
||||
SYSTEM_TASK_ABS_CPU = cpu_limit
|
||||
|
||||
SECRET_KEY = get_secret()
|
||||
|
||||
ALLOWED_HOSTS = ['*']
|
||||
@@ -172,15 +184,15 @@ data:
|
||||
deny all;
|
||||
}
|
||||
|
||||
location /static/ {
|
||||
location {{ (ingress_path + '/static').replace('//', '/') }} {
|
||||
alias /var/lib/awx/public/static/;
|
||||
}
|
||||
|
||||
location /favicon.ico {
|
||||
location {{ (ingress_path + '/favicon.ico').replace('//', '/') }} {
|
||||
alias /var/lib/awx/public/static/media/favicon.ico;
|
||||
}
|
||||
|
||||
location /websocket {
|
||||
location {{ (ingress_path + '/websocket').replace('//', '/') }} {
|
||||
# Pass request to the upstream alias
|
||||
proxy_pass http://daphne;
|
||||
# Require http version 1.1 to allow for upgrade requests
|
||||
@@ -202,7 +214,7 @@ data:
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
}
|
||||
|
||||
location / {
|
||||
location {{ ingress_path }} {
|
||||
# Add trailing / if missing
|
||||
rewrite ^(.*)$http_host(.*[^/])$ $1$http_host$2/ permanent;
|
||||
uwsgi_read_timeout 120s;
|
||||
|
||||
@@ -27,14 +27,18 @@ spec:
|
||||
app.kubernetes.io/part-of: '{{ ansible_operator_meta.name }}'
|
||||
app.kubernetes.io/managed-by: '{{ deployment_type }}-operator'
|
||||
app.kubernetes.io/component: '{{ deployment_type }}'
|
||||
{% if annotations %}
|
||||
annotations:
|
||||
{{ annotations | indent(width=8) }}
|
||||
{% endif %}
|
||||
spec:
|
||||
serviceAccountName: '{{ ansible_operator_meta.name }}'
|
||||
{% if image_pull_secret %}
|
||||
imagePullSecrets:
|
||||
- name: {{ image_pull_secret }}
|
||||
{% endif %}
|
||||
{% if bundle_ca_crt or projects_persistence|bool or init_container_extra_commands %}
|
||||
initContainers:
|
||||
{% if bundle_ca_crt or projects_persistence|bool or init_container_extra_commands %}
|
||||
- name: init
|
||||
image: '{{ _init_container_image }}'
|
||||
imagePullPolicy: '{{ image_pull_policy }}'
|
||||
@@ -169,6 +173,8 @@ spec:
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
- name: UWSGI_MOUNT_PATH
|
||||
value: "{{ ingress_path }}"
|
||||
{% if development_mode | bool %}
|
||||
- name: AWX_KUBE_DEVEL
|
||||
value: "1"
|
||||
|
||||
@@ -37,6 +37,20 @@ spec:
|
||||
imagePullSecrets:
|
||||
- name: {{ image_pull_secret }}
|
||||
{% endif %}
|
||||
initContainers:
|
||||
- name: database-check
|
||||
image: '{{ _init_container_image }}'
|
||||
resources: {{ postgres_init_container_resource_requirements }}
|
||||
imagePullPolicy: '{{ image_pull_policy }}'
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- |
|
||||
[[ -d /check-db/pgsql/data ]] && rm -rf /check-db/data && mv /check-db/pgsql/data/ /check-db/data/ && rm -rf /check-db/pgsql || exit 0
|
||||
volumeMounts:
|
||||
- name: postgres
|
||||
mountPath: /check-db
|
||||
subPath: ''
|
||||
containers:
|
||||
- image: '{{ _postgres_image }}'
|
||||
imagePullPolicy: '{{ image_pull_policy }}'
|
||||
|
||||
@@ -11,13 +11,20 @@ metadata:
|
||||
app.kubernetes.io/component: '{{ deployment_type }}'
|
||||
app.kubernetes.io/operator-version: '{{ lookup("env", "OPERATOR_VERSION") }}'
|
||||
{{ service_labels | indent(width=4) }}
|
||||
{% if service_type | lower == 'loadbalancer' and loadbalancer_annotations %}
|
||||
{% if service_annotations %}
|
||||
annotations:
|
||||
{{ loadbalancer_annotations | indent(width=4) }}
|
||||
{{ service_annotations | indent(width=4) }}
|
||||
{% endif %}
|
||||
spec:
|
||||
ports:
|
||||
{% if service_type | lower != 'loadbalancer' and loadbalancer_protocol | lower != 'https' %}
|
||||
|
||||
{% if service_type | lower == "nodeport" %}
|
||||
- port: 80
|
||||
protocol: TCP
|
||||
targetPort: 8052
|
||||
name: http
|
||||
nodePort: {{ nodeport_port }}
|
||||
{% elif service_type | lower != 'loadbalancer' and loadbalancer_protocol | lower != 'https' %}
|
||||
- port: 80
|
||||
protocol: TCP
|
||||
targetPort: 8052
|
||||
@@ -44,10 +51,10 @@ spec:
|
||||
app.kubernetes.io/name: '{{ ansible_operator_meta.name }}'
|
||||
app.kubernetes.io/managed-by: '{{ deployment_type }}-operator'
|
||||
app.kubernetes.io/component: '{{ deployment_type }}'
|
||||
{% if service_type | lower == "loadbalancer" %}
|
||||
type: LoadBalancer
|
||||
{% elif service_type | lower == "nodeport" %}
|
||||
{% if service_type | lower == "nodeport" %}
|
||||
type: NodePort
|
||||
{% elif service_type | lower == "loadbalancer" %}
|
||||
type: LoadBalancer
|
||||
{% else %}
|
||||
type: ClusterIP
|
||||
{% endif %}
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
command: |
|
||||
bash -c """
|
||||
set -e -o pipefail
|
||||
cat {{ backup_dir }}/tower.db | PGPASSWORD={{ awx_postgres_pass }} {{ pg_restore }}
|
||||
cat {{ backup_dir }}/tower.db | PGPASSWORD='{{ awx_postgres_pass }}' {{ pg_restore }}
|
||||
echo 'Successful'
|
||||
"""
|
||||
register: data_migration
|
||||
|
||||
Reference in New Issue
Block a user