Compare commits

...

49 Commits
2.0.1 ... 2.3.0

Author SHA1 Message Date
loh
1d72a97ac8 Add doc note about extra_settings being read-only in AWX UI
Co-authored-by: Christian Adams <rooftopcellist@gmail.com>
2023-06-23 15:14:06 -04:00
rakesh561
a8d2831b1c Update code with capability to set the init container resources instead of using web or task container resources (#1439) 2023-06-23 18:09:09 +00:00
Stanislav Zaprudskiy
213c1bebc4 Do not cause web deployment restart on pre-stop scripts changes (#1458) 2023-06-23 11:25:58 -04:00
Hao Liu
ca6666d271 Fix failure in CI while creating kind cluster (#1462) 2023-06-23 10:18:58 -04:00
soumyadeep-paul-ibm
56d1966397 Update manager_auth_proxy_patch.yaml (#1438)
Co-authored-by: Christian Adams <chadams@redhat.com>
2023-06-21 18:30:17 +00:00
rakesh561
fcc09673cc Add db_management_pod_node_selector for specifying nodeSelect for backup/restore mgmt pod (#1434)
Co-authored-by: Hao Liu <44379968+TheRealHaoLiu@users.noreply.github.com>
Co-authored-by: Jesse Wattenbarger <jesse.j.wattenbarger@gmail.com>
2023-06-21 10:46:29 -04:00
rakesh561
b1655479d2 Updated task.yaml.j2 rsyslog container to have preStop hook (#1422)
Co-authored-by: Stanislav Zaprudskiy <stanislav.zaprudskiy@gmail.com>
2023-06-09 16:33:31 -04:00
Hao Liu
a5e29aefec Relocate receptor cert and key file location (#1442) 2023-06-09 14:19:04 -04:00
dale-mittleman
4d20079cfe Fix rsyslog container resources in task deployment template (#1426) 2023-05-19 13:05:37 -04:00
John Westcott IV
645f3a7cf8 Merge pull request #1420 from john-westcott-iv/change_helm_release
Changing helm-release url setting from global to local
2023-05-18 08:31:10 -04:00
john-westcott-iv
b65457a056 Changing url setting from global to local 2023-05-17 16:23:14 -04:00
Christian Adams
72bf56946f Fix helm release push with HTTPS (#1419) 2023-05-17 15:38:35 -04:00
Seth Foster
a62487b58b Merge pull request #1418 from fosterseth/fix_rsyslog_resources
Fix templating error when bundle_ca_crt is present
2023-05-17 15:19:20 -04:00
Seth Foster
aa78813d73 Rsyslog resources wrong location 2023-05-17 15:02:20 -04:00
Christian Adams
a08c9104a9 Add GHA for re-publishing helm chart when necessary & for debugging (#1417) 2023-05-17 14:27:44 -04:00
Shane McDonald
5da4b697f1 Merge pull request #1416 from laiminhtrung1997/remove-redundant-slashes
Remove redundant slash in path to template
2023-05-17 14:15:35 -04:00
laiminhtrung1997
f99a83c137 Remove redundant slashes. 2023-05-17 22:54:52 +07:00
rakesh561
721d6814ca Added capability to set the rsyslog container resources (#1410)
* Update awx.ansible.com_awxs.yaml with rsyslog resource containers
* Update awx-operator.clusterserviceversion.yaml with x-descriptors
* Add default values in main.yml
* Template resource_requirements in web.yaml.j2 and task.yaml.j2
2023-05-16 21:28:36 -04:00
Jeff Smith
866acb3d9c Bump ansible-operator to v1.28.1 (#1408)
This fixes [CVE-2022-41723](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-41723)

Co-authored-by: Jeffery Smith <jeffery.smith@pearson.com>
2023-05-16 18:06:08 -04:00
Hao Liu
94dc52d224 Merge pull request #1393 from ansible/feature_keepalive
Add ability to configure Postgres keepalive settings
2023-05-15 12:26:07 -04:00
Christian Adams
c0cd78899a Add Docs for customizing the favicon for AWX (#1406) 2023-05-10 17:05:04 -04:00
Christian Adams
3b54fa8675 Host aliases (#1373)
* feat: add HostAliases to web/task containers (fixes #646)
* feat: add HostAliases to web/task containers
* Make host_aliases display in the Operator UI
* Add default value for host_aliases and add to web deployment template

Co-authored-by: zhangpeng.zong <zhangpeng.zong@funplus.com>
Co-authored-by: Dimitri Savineau <savineau.dimitri@gmail.com>
2023-05-10 14:45:48 -04:00
Hao Liu
4a869998d1 Add ability to configure postgres keepalives settings
Co-Authored-By: Gabriel Muniz <gmuniz@redhat.com>
Co-Authored-By: Rick Elrod <rick@elrod.me>
2023-05-09 14:56:20 -04:00
Christian Adams
bc044431ab Fix so that the index.yaml changes are pushed (#1402) 2023-05-08 15:24:02 -04:00
Hao Liu
4fe482b77b Unpin ubuntu version for feature branch CI build (#1400) (#1401) 2023-05-08 14:42:35 -04:00
Desmond Obisi
194340688d Create doc-proposal.md to capture the new doc proposal (#1379)
This commit contains the addition of the markdown file for the new awx-operator doc proposal
2023-05-06 01:02:35 +00:00
Wilton Rodrigues
b517b0a2a6 Fix invalid LDAP configuration example in README.md (#1397)
Commit 3d849d9179 Removed the necessary parentheses
2023-05-05 21:16:01 +00:00
Seth Foster
1dc56803e8 Set receptor log level to info (#1399) 2023-05-05 18:20:20 +00:00
Christian Adams
85da1aa1f3 Change storage class display type to dropdown (#1398) 2023-05-05 14:19:32 -04:00
Christian Adams
6378836706 Add postgres_storage_class to UI form & fix PG Storage requirements display (#1395) 2023-05-05 12:32:33 -04:00
Christian Adams
e829dafbd2 Fix molecule test by pinning community.docker for requests issue (#1396) 2023-05-04 18:30:47 -04:00
Christian Adams
1023718b87 Allow configuration of resource requirements for init containers (#1392)
- In some use cases, limits must be set for every container in a
    cluster. To address this, we will use the task and web resource
requirements for the initContainers where applicable.
2023-05-03 17:41:01 -04:00
Seth Foster
4a5141933c Merge pull request #1388 from cilq/patch-1
Fix variable name for loadbalancerip in template.
2023-05-03 14:07:44 -04:00
Shane McDonald
084841f549 Merge pull request #1389 from patrickdappollonio/devel
Update Makefile
2023-05-02 12:43:35 -04:00
Patrick D'appollonio
76ab4a8342 Update Makefile 2023-05-02 11:53:13 -04:00
Rick Elrod
2d6aa5815f [ci] pin ansible-compat for molecule
https://github.com/ansible-community/molecule/issues/3903

Signed-off-by: Rick Elrod <rick@elrod.me>
2023-05-02 09:47:56 -05:00
Dimitri Savineau
d69b57c014 web: Use sha1 filter instead of md5 (#1386)
This was fixed in 6cae8df but the task/web split rebase didn't apply this
to the web deployment.
This prevents to deploy the operator when FIPS is enabled.

{"msg": "An unhandled exception occurred while running the lookup plugin
'template'. Error was a <class 'ValueError'>, original message:
[digital envelope routines: EVP_DigestInit_ex] disabled for FIPS"}

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
2023-05-02 10:19:21 -04:00
André Liebigt
562a171de6 Fix variable name for loadbalancerip in template.
The template now checks the existence of the correct variable so that it actually works.
2023-05-02 13:53:06 +02:00
Jason Goldfine-Middleton
2118c6f49c Fix typo in rsyslog var
Rename all references: ryslog_args -> rsyslog_args
2023-04-28 10:49:49 -05:00
Seth Foster
9c759bfe88 bump kustomize v4.5.7 to v5.0.1 (#1357) 2023-04-21 14:49:42 -04:00
Christian Adams
d0205f4e5e Add docs for how to run molecule tests with kind (#1375)
- test-local docker scenario was removed in 9a54ae2937
2023-04-20 15:47:36 -04:00
Lukas Magauer
d914edf3e0 The ingress resulted in a double slash, if there is are slashes at the end of the ingress_path variable (#1374)
Co-authored-by: lumarel <lumarel@users.noreply.github.com>
2023-04-19 23:35:36 -04:00
John Westcott IV
be4fd1364c Merge pull request #1371 from john-westcott-iv/another-helm-fix
Changing helm-release again
2023-04-19 17:26:43 -04:00
Christian Adams
599b1e387d Fix linter warnings on PRs (#1372) 2023-04-19 18:36:29 +00:00
john-westcott-iv
732ff9c02c Changing helm-release again 2023-04-19 12:25:14 -04:00
Hao Liu
d0e30a6878 Merge pull request #1368 from tanganellilore/fix_promote
fix chart package path on helm-release playbook
2023-04-19 11:31:57 -04:00
Shane McDonald
a213b60008 Merge pull request #1369 from sdx23/patch-1
Update README.md
2023-04-19 09:13:58 -04:00
sdx23
768327ea3b Update README.md
Adaptations to use kustomize implicitly via kubectl apply -k
2023-04-19 11:18:00 +02:00
Lorenzo Tanganelli
4908ecfd5d fix chart package path on hel-release playbook 2023-04-19 09:32:17 +02:00
33 changed files with 477 additions and 126 deletions

View File

@@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
name: molecule name: molecule
env: env:
DOCKER_API_VERSION: "1.38" DOCKER_API_VERSION: "1.41"
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2

View File

@@ -8,7 +8,7 @@ on:
jobs: jobs:
release: release:
runs-on: ubuntu-18.04 runs-on: ubuntu-latest
name: Push devel image name: Push devel image
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3

View File

@@ -12,11 +12,6 @@ jobs:
with: with:
depth: 0 depth: 0
- uses: actions/checkout@v3
with:
ref: gh-pages
path: gh-pages
- name: Log in to GHCR - name: Log in to GHCR
run: | run: |
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin
@@ -40,4 +35,5 @@ jobs:
-e chart_owner=${{ github.repository_owner }} \ -e chart_owner=${{ github.repository_owner }} \
-e tag=${{ github.event.release.tag_name }} \ -e tag=${{ github.event.release.tag_name }} \
-e gh_token=${{ secrets.GITHUB_TOKEN }} \ -e gh_token=${{ secrets.GITHUB_TOKEN }} \
-e gh_user=${{ github.actor }} -e gh_user=${{ github.actor }} \
-e repo_type=https

26
.github/workflows/publish-helm.yml vendored Normal file
View File

@@ -0,0 +1,26 @@
---
name: Re-publish helm chart
on:
workflow_dispatch:
inputs:
tag:
description: 'Release tag'
required: true
type: string
jobs:
promote:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
depth: 0
- name: Release Helm chart
run: |
ansible-playbook ansible/helm-release.yml -v \
-e operator_image=quay.io/${{ github.repository }} \
-e chart_owner=${{ github.repository_owner }} \
-e tag=${{ inputs.tag }} \
-e gh_token=${{ secrets.GITHUB_TOKEN }} \
-e gh_user=${{ github.actor }} \
-e repo_type=https

View File

@@ -1,4 +1,4 @@
AWX: AWX:
# enable use of awx-deploy template # enable use of awx-deploy template
enabled: false enabled: false
name: awx name: awx

View File

@@ -7,6 +7,7 @@ ignore: |
awx-operator.clusterserviceversion.yaml awx-operator.clusterserviceversion.yaml
bundle bundle
.helm/starter .helm/starter
hacking/
rules: rules:
truthy: disable truthy: disable

View File

@@ -31,7 +31,7 @@ Have questions about this document or anything not covered here? Please file a n
``` ```
2. Make your changes. 2. Make your changes.
3. Test your changes according described on the Testing section. 3. Test your changes according described on the Testing section.
4. If everylooks looks correct, commit your changes. 4. If everything looks correct, commit your changes.
```sh ```sh
#> git add <FILES> #> git add <FILES>
#> git commit -m "My message here" #> git commit -m "My message here"
@@ -56,14 +56,17 @@ Running `molecule test` sets up a clean environment, builds the operator, runs a
If you want to actively develop the operator, use `molecule converge`, which does everything but tear down the environment at the end. If you want to actively develop the operator, use `molecule converge`, which does everything but tear down the environment at the end.
#### Testing in Docker #### Testing in Kind
Testing with a kind cluster is the recommended way to test the awx-operator locally. First, you need to install kind if you haven't already. Please see these docs for setting that up:
* https://kind.sigs.k8s.io/docs/user/quick-start/
To run the tests, from the root of your checkout, run the following command:
```sh ```sh
#> molecule test -s test-local #> molecule test -s kind
``` ```
This environment is meant for headless testing (e.g. in a CI environment, or when making smaller changes which don't need to be verified through a web interface). It is difficult to test things like AWX's web UI or to connect other applications on your local machine to the services running inside the cluster, since it is inside a Docker container with no static IP address.
#### Testing in Minikube #### Testing in Minikube
```sh ```sh
@@ -137,4 +140,4 @@ Applying this template will do it. Once the CatalogSource is in a READY state, t
## Reporting Issues ## Reporting Issues
We welcome your feedback, and encourage you to file an issue when you run into a problem. We welcome your feedback, and encourage you to file an issue when you run into a problem.

View File

@@ -1,4 +1,4 @@
FROM quay.io/operator-framework/ansible-operator:v1.26.0 FROM quay.io/operator-framework/ansible-operator:v1.28.1
USER 0 USER 0

View File

@@ -65,6 +65,7 @@ CHART_DESCRIPTION ?= A Helm chart for the AWX Operator
CHART_OWNER ?= $(GH_REPO_OWNER) CHART_OWNER ?= $(GH_REPO_OWNER)
CHART_REPO ?= awx-operator CHART_REPO ?= awx-operator
CHART_BRANCH ?= gh-pages CHART_BRANCH ?= gh-pages
CHART_DIR ?= gh-pages
CHART_INDEX ?= index.yaml CHART_INDEX ?= index.yaml
.PHONY: all .PHONY: all
@@ -140,7 +141,7 @@ ifeq (,$(shell which kustomize 2>/dev/null))
@{ \ @{ \
set -e ;\ set -e ;\
mkdir -p $(dir $(KUSTOMIZE)) ;\ mkdir -p $(dir $(KUSTOMIZE)) ;\
curl -sSLo - https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/v4.5.7/kustomize_v4.5.7_$(OS)_$(ARCHA).tar.gz | \ curl -sSLo - https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/v5.0.1/kustomize_v5.0.1_$(OS)_$(ARCHA).tar.gz | \
tar xzf - -C bin/ ;\ tar xzf - -C bin/ ;\
} }
else else
@@ -227,7 +228,7 @@ ifeq (,$(shell which kubectl-slice 2>/dev/null))
@{ \ @{ \
set -e ;\ set -e ;\
mkdir -p $(dir $(KUBECTL_SLICE)) ;\ mkdir -p $(dir $(KUBECTL_SLICE)) ;\
curl -sSLo - https://github.com/patrickdappollonio/kubectl-slice/releases/download/v1.1.0/kubectl-slice_1.1.0_$(OS)_$(ARCHX).tar.gz | \ curl -sSLo - https://github.com/patrickdappollonio/kubectl-slice/releases/download/v1.2.6/kubectl-slice_$(OS)_$(ARCHX).tar.gz | \
tar xzf - -C bin/ kubectl-slice ;\ tar xzf - -C bin/ kubectl-slice ;\
} }
else else
@@ -364,7 +365,7 @@ TAGS := $(shell git ls-remote --tags --sort=version:refname --refs -q | cut -d/
# that is contained within a larger repo, where a tag may not require a new chart version # that is contained within a larger repo, where a tag may not require a new chart version
.PHONY: helm-index .PHONY: helm-index
helm-index: helm-index:
# when running in CI this gh-pages are already checked out with github action to 'gh-pages' directory # when running in CI the gh-pages branch is checked out by the ansible playbook
# TODO: test if gh-pages directory exists and if not exist # TODO: test if gh-pages directory exists and if not exist
@echo "== GENERATE INDEX FILE ==" @echo "== GENERATE INDEX FILE =="
@@ -392,6 +393,6 @@ helm-index:
# generate the index file in the root of the gh-pages branch # generate the index file in the root of the gh-pages branch
# --merge will leave any values in index.yaml that don't get generated by this command, but # --merge will leave any values in index.yaml that don't get generated by this command, but
# it is likely that all values are overridden # it is likely that all values are overridden
$(HELM) repo index .cr-release-packages --url https://github.com/$(CHART_OWNER)/$(CHART_REPO)/releases/download/ --merge gh-pages/index.yaml $(HELM) repo index .cr-release-packages --url https://github.com/$(CHART_OWNER)/$(CHART_REPO)/releases/download/ --merge $(CHART_DIR)/index.yaml
mv .cr-release-packages/index.yaml gh-pages/index.yaml mv .cr-release-packages/index.yaml $(CHART_DIR)/index.yaml

View File

@@ -131,7 +131,7 @@ $ alias kubectl="minikube kubectl --"
### Basic Install ### Basic Install
Once you have a running Kubernetes cluster, you can deploy AWX Operator into your cluster using [Kustomize](https://kubectl.docs.kubernetes.io/guides/introduction/kustomize/). Follow the instructions here to install the latest version of Kustomize: https://kubectl.docs.kubernetes.io/installation/kustomize/ Once you have a running Kubernetes cluster, you can deploy AWX Operator into your cluster using [Kustomize](https://kubectl.docs.kubernetes.io/guides/introduction/kustomize/). Since kubectl version 1.14 kustomize functionality is built-in (otherwise, follow the instructions here to install the latest version of Kustomize: https://kubectl.docs.kubernetes.io/installation/kustomize/ )
First, create a file called `kustomization.yaml` with the following content: First, create a file called `kustomization.yaml` with the following content:
@@ -156,7 +156,7 @@ namespace: awx
Install the manifests by running this: Install the manifests by running this:
``` ```
$ kustomize build . | kubectl apply -f - $ kubectl apply -k .
namespace/awx created namespace/awx created
customresourcedefinition.apiextensions.k8s.io/awxbackups.awx.ansible.com created customresourcedefinition.apiextensions.k8s.io/awxbackups.awx.ansible.com created
customresourcedefinition.apiextensions.k8s.io/awxrestores.awx.ansible.com created customresourcedefinition.apiextensions.k8s.io/awxrestores.awx.ansible.com created
@@ -229,10 +229,10 @@ resources:
... ...
``` ```
Finally, run `kustomize` again to create the AWX instance in your cluster: Finally, apply the changes to create the AWX instance in your cluster:
``` ```
kustomize build . | kubectl apply -f - kubectl apply -k .
``` ```
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: 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:
@@ -676,6 +676,25 @@ $ oc adm policy add-scc-to-user privileged -z awx
Again, this is the most relaxed SCC that is provided by OpenShift, so be sure to familiarize yourself with the security concerns that accompany this action. Again, this is the most relaxed SCC that is provided by OpenShift, so be sure to familiarize yourself with the security concerns that accompany this action.
#### Containers HostAliases Requirements
Sometimes you might need to use [HostAliases](https://kubernetes.io/docs/tasks/network/customize-hosts-file-for-pods/) in web/task containers.
| Name | Description | Default |
| ------------ | --------------------- | ------- |
| host_aliases | A list of HostAliases | None |
Example of customization could be:
```yaml
---
spec:
...
host_aliases:
- ip: <name-of-your-ip>
hostnames:
- <name-of-your-domain>
```
#### Containers Resource Requirements #### Containers Resource Requirements
@@ -911,7 +930,7 @@ A sample of extra settings can be found as below. All possible options can be fo
value: 'LDAPSearch("OU=Groups,DC=abc,DC=com",ldap.SCOPE_SUBTREE,"(objectClass=group)",)' value: 'LDAPSearch("OU=Groups,DC=abc,DC=com",ldap.SCOPE_SUBTREE,"(objectClass=group)",)'
- setting: AUTH_LDAP_GROUP_TYPE - setting: AUTH_LDAP_GROUP_TYPE
value: 'GroupOfNamesType' value: 'GroupOfNamesType()'
- setting: AUTH_LDAP_USER_ATTR_MAP - setting: AUTH_LDAP_USER_ATTR_MAP
value: '{"first_name": "givenName","last_name": "sn","email": "mail"}' value: '{"first_name": "givenName","last_name": "sn","email": "mail"}'
@@ -1064,6 +1083,33 @@ Using the [extra_volumes feature](#custom-volume-and-volume-mount-options), it i
The AWX nginx config automatically includes /etc/nginx/conf.d/*.conf if present. The AWX nginx config automatically includes /etc/nginx/conf.d/*.conf if present.
##### Custom Favicon
You can use custom volume mounts to mount in your own favicon to be displayed in your AWX browser tab.
First, Create the configmap from a local favicon.ico file.
```bash
$ oc create configmap favicon-configmap --from-file favicon.ico
```
Then specify the extra_volume and web_extra_volume_mounts on your AWX CR spec
```yaml
spec:
extra_volumes: |
- name: favicon
configMap:
defaultMode: 420
items:
- key: favicon.ico
path: favicon.ico
name: favicon-configmap
web_extra_volume_mounts: |
- name: favicon
mountPath: /var/lib/awx/public/static/media/favicon.ico
subPath: favicon.ico
```
#### Default execution environments from private registries #### Default execution environments from private registries
@@ -1174,6 +1220,8 @@ With`extra_settings`, you can pass multiple custom settings via the `awx-operato
| -------------- | -------------- | ------- | | -------------- | -------------- | ------- |
| extra_settings | Extra settings | '' | | extra_settings | Extra settings | '' |
**Note:** Parameters configured in `extra_settings` are set as read-only settings in AWX. As a result, they cannot be changed in the UI after deployment. If you need to change the setting after the initial deployment, you need to change it on the AWX CR spec.
Example configuration of `extra_settings` parameter Example configuration of `extra_settings` parameter
```yaml ```yaml

View File

@@ -2,6 +2,8 @@
- hosts: localhost - hosts: localhost
vars: vars:
chart_repo: awx-operator chart_repo: awx-operator
environment:
CHART_OWNER: "{{ chart_owner }}"
tasks: tasks:
- name: Look up release - name: Look up release
uri: uri:
@@ -43,7 +45,7 @@
- name: Upload helm chart - name: Upload helm chart
uri: uri:
url: "https://uploads.github.com/repos/{{ chart_owner }}/{{ chart_repo }}/releases/{{ release.json.id }}/assets?name={{ helm_file_name }}" url: "https://uploads.github.com/repos/{{ chart_owner }}/{{ chart_repo }}/releases/{{ release.json.id }}/assets?name={{ helm_file_name }}"
src: "{{ playbook_dir }}/../.cr-release-packages/awx-operator-{{ tag }}.tgz" src: "{{ playbook_dir }}/../.cr-release-packages/{{ tag }}/awx-operator-{{ tag }}.tgz"
headers: headers:
Authorization: "token {{ gh_token }}" Authorization: "token {{ gh_token }}"
Content-Type: "application/octet-stream" Content-Type: "application/octet-stream"
@@ -66,26 +68,55 @@
- when: commits_for_release.stdout == '' - when: commits_for_release.stdout == ''
block: block:
- name: Configure git config - name: Make a temp dir
shell: | tempfile:
git config user.name {{ gh_user }} state: directory
git config user.email {{ gh_user }}@users.noreply.github.com register: temp_dir
args:
chdir: "{{ playbook_dir }}/../gh-pages" - name: Clone the gh-pages branch from {{ chart_owner }}
git:
repo: "{{ ((repo_type | default('http')) == 'ssh') | ternary(ssh_repo, http_repo) }}"
dest: "{{ temp_dir.path }}"
single_branch: yes
version: gh-pages
vars:
http_repo: "https://github.com/{{ chart_owner }}/{{ chart_repo }}"
ssh_repo: "git@github.com:{{ chart_owner }}/{{ chart_repo }}.git"
- name: Publish helm index - name: Publish helm index
command: | ansible.builtin.command:
make helm-index cmd: make helm-index
environment: environment:
CHART_OWNER: "{{ chart_owner }}" CHART_OWNER: "{{ chart_owner }}"
CR_TOKEN: "{{ gh_token }}" CR_TOKEN: "{{ gh_token }}"
CHART_DIR: "{{ temp_dir.path }}"
args: args:
chdir: "{{ playbook_dir }}/../" chdir: "{{ playbook_dir }}/.."
- name: Set url base swap in gitconfig
command:
cmd: "git config --local url.https://{{ gh_user }}:{{ gh_token }}@github.com/.insteadOf https://github.com/"
args:
chdir: "{{ temp_dir.path }}/"
no_log: true
- name: Stage and Push commit to gh-pages branch - name: Stage and Push commit to gh-pages branch
shell: | command:
git add index.yaml cmd: "{{ item }}"
git commit -m "{{ commit_message }}" loop:
git push - git add index.yaml
- git commit -m "{{ commit_message }}"
- git push
args: args:
chdir: "{{ playbook_dir }}/../gh-pages" chdir: "{{ temp_dir.path }}/"
environment:
GIT_AUTHOR_NAME: "{{ gh_user }}"
GIT_AUTHOR_EMAIL: "{{ gh_user }}@users.noreply.github.com"
GIT_COMMITTER_NAME: "{{ gh_user }}"
GIT_COMMITTER_EMAIL: "{{ gh_user }}@users.noreply.github.com"
always:
- name: Remove temp dir
file:
path: "{{ temp_dir.path }}"
state: absent

View File

@@ -90,6 +90,9 @@ spec:
postgres_image_version: postgres_image_version:
description: PostgreSQL container image version to use description: PostgreSQL container image version to use
type: string type: string
db_management_pod_node_selector:
description: nodeSelector for the Postgres pods to backup
type: string
no_log: no_log:
description: Configure no_log for no_log tasks description: Configure no_log for no_log tasks
type: boolean type: boolean

View File

@@ -94,6 +94,9 @@ spec:
postgres_image_version: postgres_image_version:
description: PostgreSQL container image version to use description: PostgreSQL container image version to use
type: string type: string
db_management_pod_node_selector:
description: nodeSelector for the Postgres pods to backup
type: string
no_log: no_log:
description: Configure no_log for no_log tasks description: Configure no_log for no_log tasks
type: boolean type: boolean

View File

@@ -1345,6 +1345,18 @@ spec:
image_pull_secret: # deprecated image_pull_secret: # deprecated
description: (Deprecated) Image pull secret for app and database containers description: (Deprecated) Image pull secret for app and database containers
type: string type: string
host_aliases:
description: HostAliases for app containers
type: array
items:
type: object
properties:
ip:
type: string
hostnames:
type: array
items:
type: string
task_resource_requirements: task_resource_requirements:
description: Resource requirements for the task container description: Resource requirements for the task container
properties: properties:
@@ -1455,6 +1467,50 @@ spec:
type: string type: string
type: object type: object
type: object type: object
rsyslog_resource_requirements:
description: Resource requirements for the rsyslog 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
init_container_resource_requirements:
description: Resource requirements for the 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: service_account_annotations:
description: ServiceAccount annotations description: ServiceAccount annotations
type: string type: string
@@ -1596,6 +1652,25 @@ spec:
type: array type: array
items: items:
type: string type: string
postgres_keepalives:
description: Controls whether client-side TCP keepalives are used for Postgres connections.
default: true
type: boolean
postgres_keepalives_count:
description: Controls the number of TCP keepalives that can be lost before the client's connection to the server is considered dead.
type: integer
default: 5
format: int32
postgres_keepalives_idle:
description: Controls the number of seconds of inactivity after which TCP should send a keepalive message to the server.
type: integer
default: 5
format: int32
postgres_keepalives_interval:
description: Controls the number of seconds after which a TCP keepalive message that is not acknowledged by the server should be retransmitted.
type: integer
default: 5
format: int32
ca_trust_bundle: ca_trust_bundle:
description: Path where the trusted CA bundle is available description: Path where the trusted CA bundle is available
type: string type: string

View File

@@ -21,12 +21,10 @@ resources:
# [PROMETHEUS] To enable prometheus monitor, uncomment all sections with 'PROMETHEUS'. # [PROMETHEUS] To enable prometheus monitor, uncomment all sections with 'PROMETHEUS'.
#- ../prometheus #- ../prometheus
patchesStrategicMerge:
# Protect the /metrics endpoint by putting it behind auth. # Protect the /metrics endpoint by putting it behind auth.
# If you want your controller-manager to expose the /metrics # If you want your controller-manager to expose the /metrics
# endpoint w/o any authn/z, please comment the following line. # endpoint w/o any authn/z, please comment the following line.
- manager_auth_proxy_patch.yaml apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
# Mount the controller config file for loading manager configurations patches:
# through a ComponentConfig type - path: manager_auth_proxy_patch.yaml
#- manager_config_patch.yaml

View File

@@ -14,8 +14,8 @@ spec:
allowPrivilegeEscalation: false allowPrivilegeEscalation: false
capabilities: capabilities:
drop: drop:
- "ALL" - "ALL"
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.13.0 image: gcr.io/kubebuilder/kube-rbac-proxy:v0.14.1
args: args:
- "--secure-listen-address=0.0.0.0:8443" - "--secure-listen-address=0.0.0.0:8443"
- "--upstream=http://127.0.0.1:8080/" - "--upstream=http://127.0.0.1:8080/"

View File

@@ -88,10 +88,10 @@ spec:
kind: AWXRestore kind: AWXRestore
name: awxrestores.awx.ansible.com name: awxrestores.awx.ansible.com
specDescriptors: specDescriptors:
- displayName: Backup Source to restore from - description: Select what type of backup to specify. Backup CR, allows you
description: Select what type of backup to specify. Backup CR, allows you to specify to specify the name of an AWXBackup object (recommended approach). The
the name of an AWXBackup object (recommended approach). The PVC option allows you to PVC option allows you to specify a custom PVC and directory to backup from.
specify a custom PVC and directory to backup from. displayName: Backup Source to restore from
path: backup_source path: backup_source
x-descriptors: x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:select:Backup CR - urn:alm:descriptor:com.tectonic.ui:select:Backup CR
@@ -115,8 +115,9 @@ spec:
path: backup_pvc_namespace path: backup_pvc_namespace
x-descriptors: x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:hidden - urn:alm:descriptor:com.tectonic.ui:hidden
- displayName: Backup Directory - description: This is the directory inside the PVC that your backup is stored
description: This is the directory inside the PVC that your backup is stored in. in.
displayName: Backup Directory
path: backup_dir path: backup_dir
x-descriptors: x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:text - urn:alm:descriptor:com.tectonic.ui:text
@@ -151,7 +152,8 @@ spec:
x-descriptors: x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:text - urn:alm:descriptor:com.tectonic.ui:text
version: v1beta1 version: v1beta1
- description: Deploy a new instance of AWX. A standardized way to define, operate and scale automation with Ansible. - description: Deploy a new instance of AWX. A standardized way to define, operate
and scale automation with Ansible.
displayName: AWX displayName: AWX
kind: AWX kind: AWX
name: awxs.awx.ansible.com name: awxs.awx.ansible.com
@@ -186,8 +188,9 @@ spec:
x-descriptors: x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced - urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:io.kubernetes:Secret - urn:alm:descriptor:io.kubernetes:Secret
- displayName: Secret Key - description: Name of the k8s secret the symmetric encryption key is stored
description: Name of the k8s secret the symmetric encryption key is stored in. in.
displayName: Secret Key
path: secret_key_secret path: secret_key_secret
x-descriptors: x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced - urn:alm:descriptor:com.tectonic.ui:advanced
@@ -226,7 +229,7 @@ spec:
path: ingress_api_version path: ingress_api_version
x-descriptors: x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced - urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:com.tectonic.ui:text - urn:alm:descriptor:com.tectonic.ui:text
- displayName: Ingress Path - displayName: Ingress Path
path: ingress_path path: ingress_path
x-descriptors: x-descriptors:
@@ -320,6 +323,11 @@ spec:
path: image_pull_secret path: image_pull_secret
x-descriptors: x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:hidden - urn:alm:descriptor:com.tectonic.ui:hidden
- displayName: HostAliases for app containers
path: host_aliases
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:com.tectonic.ui:text
- displayName: Web Container Resource Requirements - displayName: Web Container Resource Requirements
path: web_resource_requirements path: web_resource_requirements
x-descriptors: x-descriptors:
@@ -335,9 +343,9 @@ spec:
x-descriptors: x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced - urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:com.tectonic.ui:resourceRequirements - urn:alm:descriptor:com.tectonic.ui:resourceRequirements
- displayName: PostgreSQL Init Container Resource Requirements - description: The PostgreSQL init container is not used when an external DB
description: The PostgreSQL init container is not used when an external DB
is configured is configured
displayName: PostgreSQL Init Container Resource Requirements
path: postgres_init_container_resource_requirements path: postgres_init_container_resource_requirements
x-descriptors: x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced - urn:alm:descriptor:com.tectonic.ui:advanced
@@ -347,19 +355,26 @@ spec:
x-descriptors: x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced - urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:com.tectonic.ui:resourceRequirements - urn:alm:descriptor:com.tectonic.ui:resourceRequirements
- displayName: PostgreSQL Container Resource Requirements - displayName: Rsyslog Container Resource Requirements
description: The PostgreSQL container is not used when an external DB path: rsyslog_resource_requirements
is configured x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:com.tectonic.ui:resourceRequirements
- description: The PostgreSQL container is not used when an external DB is configured
displayName: PostgreSQL Container Resource Requirements
path: postgres_resource_requirements path: postgres_resource_requirements
x-descriptors: x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced - urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:com.tectonic.ui:resourceRequirements - urn:alm:descriptor:com.tectonic.ui:resourceRequirements
- displayName: PostgreSQL Container Storage Requirements - description: The PostgreSQL container is not used when an external DB is configured
description: The PostgreSQL container is not used when an external DB displayName: PostgreSQL Container Storage Requirements
is configured
path: postgres_storage_requirements path: postgres_storage_requirements
x-descriptors: x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced - urn:alm:descriptor:com.tectonic.ui:advanced
- description: Init Container resource requirements
path: init_container_resource_requirements
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:com.tectonic.ui:resourceRequirements - urn:alm:descriptor:com.tectonic.ui:resourceRequirements
- displayName: Replicas - displayName: Replicas
path: replicas path: replicas
@@ -471,8 +486,8 @@ spec:
- displayName: Postgres Storage Class - displayName: Postgres Storage Class
path: postgres_storage_class path: postgres_storage_class
x-descriptors: x-descriptors:
- urn:alm:descriptor:io.kubernetes:StorageClass
- urn:alm:descriptor:com.tectonic.ui:advanced - urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:com.tectonic.ui:hidden
- displayName: Postgres Datapath - displayName: Postgres Datapath
path: postgres_data_path path: postgres_data_path
x-descriptors: x-descriptors:
@@ -483,6 +498,26 @@ spec:
x-descriptors: x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced - urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:com.tectonic.ui:hidden - urn:alm:descriptor:com.tectonic.ui:hidden
- displayName: Enable Postgres Keepalives
path: postgres_keepalives
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:com.tectonic.ui:hidden
- displayName: Postgres Keepalives Count
path: postgres_keepalives_count
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:com.tectonic.ui:hidden
- displayName: Postgres Keepalives Idle
path: postgres_keepalives_idle
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:com.tectonic.ui:hidden
- displayName: Postgres Keepalives Interval
path: postgres_keepalives_interval
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:com.tectonic.ui:hidden
- displayName: Certificate Authorirty Trust Bundle - displayName: Certificate Authorirty Trust Bundle
path: ca_trust_bundle path: ca_trust_bundle
x-descriptors: x-descriptors:
@@ -790,8 +825,8 @@ spec:
x-descriptors: x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced - urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:com.tectonic.ui:booleanSwitch - urn:alm:descriptor:com.tectonic.ui:booleanSwitch
- displayName: Additional labels defined on the resource, which should be - displayName: Additional labels defined on the resource, which should be propagated
propagated to child resources to child resources
path: additional_labels path: additional_labels
x-descriptors: x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced - urn:alm:descriptor:com.tectonic.ui:advanced
@@ -876,7 +911,7 @@ spec:
- email: awx-project@googlegroups.com - email: awx-project@googlegroups.com
name: AWX Team name: AWX Team
maturity: alpha maturity: alpha
MinKubeVersion: 1.22.15 minKubeVersion: 1.22.15
provider: provider:
name: Ansible name: Ansible
url: github.com/ansible/awx-operator url: github.com/ansible/awx-operator

View File

@@ -7,10 +7,6 @@ namePrefix: osdk-
#commonLabels: #commonLabels:
# someName: someValue # someName: someValue
patchesStrategicMerge:
- manager_image.yaml
- debug_logs_patch.yaml
- ../default/manager_auth_proxy_patch.yaml
apiVersion: kustomize.config.k8s.io/v1beta1 apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization kind: Kustomization
@@ -21,3 +17,7 @@ resources:
images: images:
- name: testing - name: testing
newName: testing-operator newName: testing-operator
patches:
- path: manager_image.yaml
- path: debug_logs_patch.yaml
- path: ../default/manager_auth_proxy_patch.yaml

29
docs/doc-proposal.md Normal file
View File

@@ -0,0 +1,29 @@
# Docs Breakdown for AWX Operator
## Introduction
This table below is aimed at breaking down the ReadME documentation for Ansible AWX Operator and structure it in the way it can be moved to the Read The Docs module.
From the ReadMe file, the documentation can be classified into six distinct segments which are:
- Introduction/Getting Started
- Installation
- User Guide
- Upgrade
- Uninstall
- Contributors Guide
Using these listed segments, we can do a proper breakdown of all the topics in the ReadMe and place each one in the segment they fall into. This table is open to any form of refactoring or modifications.
| Segments | Topics |
| ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Introduction | - [Purpose](https://github.com/ansible/awx-operator#purpose) |
| Installation | - [Creating a minikube cluster for testing](https://github.com/ansible/awx-operator#creating-a-minikube-cluster-for-testing)<br>- [Basic Install](https://github.com/ansible/awx-operator#basic-install)<br>- [Helm Install on existing cluster](https://github.com/ansible/awx-operator#helm-install-on-existing-cluster) |
| User Guide | - [Admin user account configuration](https://github.com/ansible/awx-operator#admin-user-account-configuration)<br>- [Network and TLS Configuration](https://github.com/ansible/awx-operator#network-and-tls-configuration)<br> * [Service Type](https://github.com/ansible/awx-operator#service-type)<br> * [Ingress Type](https://github.com/ansible/awx-operator#ingress-type)<br>- [Database Configuration](https://github.com/ansible/awx-operator#database-configuration)<br> * [External PostgreSQL Service](https://github.com/ansible/awx-operator#external-postgresql-service)<br> * [Migrating data from an old AWX instance](https://github.com/ansible/awx-operator#migrating-data-from-an-old-awx-instance)<br> * [Managed PostgreSQL Service](https://github.com/ansible/awx-operator#managed-postgresql-service)<br>- [Advanced Configuration](https://github.com/ansible/awx-operator#advanced-configuration)<br> * [Deploying a specific version of AWX](https://github.com/ansible/awx-operator#deploying-a-specific-version-of-awx)<br> * [Redis container capabilities](https://github.com/ansible/awx-operator#redis-container-capabilities)<br> * [Privileged Tasks](https://github.com/ansible/awx-operator#privileged-tasks)<br> * [Containers Resource Requirements](https://github.com/ansible/awx-operator#containers-resource-requirements)<br> * [Priority Classes](https://github.com/ansible/awx-operator#priority-classes)<br> * [Assigning AWX pods to specific nodes](https://github.com/ansible/awx-operator#assigning-awx-pods-to-specific-nodes)<br> * [Trusting a Custom Certificate Authority](https://github.com/ansible/awx-operator#trusting-a-custom-certificate-authority)<br> * [Enabling LDAP Integration at AWX bootstrap](https://github.com/ansible/awx-operator#enabling-ldap-integration-at-awx-bootstrap)<br> * [Persisting Projects Directory](https://github.com/ansible/awx-operator#persisting-projects-directory)<br> * [Custom Volume and Volume Mount Options](https://github.com/ansible/awx-operator#custom-volume-and-volume-mount-options)<br> * [Default execution environments from private registries](https://github.com/ansible/awx-operator#default-execution-environments-from-private-registries)<br> * * [Control plane ee from private registry](https://github.com/ansible/awx-operator#control-plane-ee-from-private-registry)<br> * [Exporting Environment Variables to Containers](https://github.com/ansible/awx-operator#exporting-environment-variables-to-containers)<br> * [CSRF Cookie Secure Setting](https://github.com/ansible/awx-operator#csrf-cookie-secure-setting)<br> * [Session Cookie Secure Setting](https://github.com/ansible/awx-operator#session-cookie-secure-setting)<br> * [Extra Settings](https://github.com/ansible/awx-operator#extra-settings)<br> * [Configure no_log](https://github.com/ansible/awx-operator#no-log)<br> * [Auto Upgrade](https://github.com/ansible/awx-operator#auto-upgrade)<br> ** [Upgrade of instances without auto upgrade](https://github.com/ansible/awx-operator#upgrade-of-instances-without-auto-upgrade)<br> * [Service Account](https://github.com/ansible/awx-operator#service-account)<br> * [Labeling operator managed objects](https://github.com/ansible/awx-operator#labeling-operator-managed-objects)<br> * [Pods termination grace period](https://github.com/ansible/awx-operator#pods-termination-grace-period)<br> * [Disable IPV6](https://github.com/ansible/awx-operator#disable-ipv6)<br> * [Add Execution Nodes](https://github.com/ansible/awx-operator#adding-execution-nodes)<br> ** [Custom Receptor CA](https://github.com/ansible/awx-operator#custom-receptor-ca)<br> * [Debugging](https://github.com/ansible/awx-operator/blob/devel/docs/debugging.md)<br> * [Migration](https://github.com/ansible/awx-operator/blob/devel/docs/migration.md) |
| Upgrade | - [Upgrading](https://github.com/ansible/awx-operator#upgrading)<br> * [Backup](https://github.com/ansible/awx-operator#backup)<br> * [v0.14.0](https://github.com/ansible/awx-operator#v0140)<br> ** [Cluster-scope to Namespace-scope considerations](https://github.com/ansible/awx-operator#cluster-scope-to-namespace-scope-considerations)<br> ** [Project is now based on v1.x of the operator-sdk project](https://github.com/ansible/awx-operator#project-is-now-based-on-v1x-of-the-operator-sdk-project)<br> ** [Steps to upgrade](https://github.com/ansible/awx-operator#steps-to-upgrade) |
| Uninstall | - [Uninstall](https://github.com/ansible/awx-operator#uninstall) |
| Contributors Guide | - [Contributing](https://github.com/ansible/awx-operator#contributing)<br>- [Release Process](https://github.com/ansible/awx-operator#release-process)<br>- [Author](https://github.com/ansible/awx-operator#author)<br>- [Code of Conduct](https://github.com/ansible/awx-operator#code-of-conduct)<br>- [Get Involved](https://github.com/ansible/awx-operator#get-involved) |
Note: I could not get the multi-level bullet point list to work in the table so I used single asterisk `*` for one level down and double asterisk `**` for two level down.

View File

@@ -5,8 +5,20 @@
gather_facts: no gather_facts: no
tasks: tasks:
# Remove after this if fixed: https://github.com/ansible-collections/community.docker/issues/611
- name: Install docker
become: yes
pip:
name:
- websocket-client==0.59.0
- requests==2.28.2
- urllib3==1.26.15
- docker
- docker-compose
state: present
- name: Build operator image - name: Build operator image
docker_image: community.docker.docker_image:
build: build:
path: '{{ project_dir }}' path: '{{ project_dir }}'
pull: no pull: no

View File

@@ -5,3 +5,4 @@ ansible-lint
openshift!=0.13.0 openshift!=0.13.0
jmespath jmespath
ansible-core ansible-core
ansible-compat<4 # https://github.com/ansible-community/molecule/issues/3903

View File

@@ -5,4 +5,5 @@ collections:
version: 2.3.2 version: 2.3.2
- name: operator_sdk.util - name: operator_sdk.util
- name: community.docker - name: community.docker
version: 3.4.4
- name: awx.awx - name: awx.awx

View File

@@ -17,6 +17,14 @@ no_log: true
# Variable to set when you want backups to be cleaned up when the CRD object is deleted # Variable to set when you want backups to be cleaned up when the CRD object is deleted
clean_backup_on_delete: false clean_backup_on_delete: false
# Add a nodeSelector for the Postgres pods to backup.
# Specify as literal block. E.g.:
# db_management_pod_node_selector: |
# kubernetes.io/arch: amd64
# kubernetes.io/os: linux
db_management_pod_node_selector: ''
# Variable to signal that this role is being run as a finalizer # Variable to signal that this role is being run as a finalizer
finalizer_run: false finalizer_run: false

View File

@@ -20,6 +20,10 @@ spec:
resources: resources:
{{ backup_resource_requirements | to_nice_yaml(indent=2) | indent(width=6, first=False) }} {{ backup_resource_requirements | to_nice_yaml(indent=2) | indent(width=6, first=False) }}
{%- endif %} {%- endif %}
{% if db_management_pod_node_selector %}
nodeSelector:
{{ db_management_pod_node_selector | indent(width=8) }}
{% endif %}
volumes: volumes:
- name: {{ ansible_operator_meta.name }}-backup - name: {{ ansible_operator_meta.name }}-backup
persistentVolumeClaim: persistentVolumeClaim:

View File

@@ -283,7 +283,7 @@ task_command: []
web_args: web_args:
- /usr/bin/launch_awx_web.sh - /usr/bin/launch_awx_web.sh
web_command: [] web_command: []
ryslog_args: rsyslog_args:
- /usr/bin/launch_awx_rsyslog.sh - /usr/bin/launch_awx_rsyslog.sh
rsyslog_command: [] rsyslog_command: []
@@ -303,10 +303,6 @@ ee_resource_requirements:
memory: 64Mi memory: 64Mi
# TODO: validate default resource requirements # TODO: validate default resource requirements
rsyslog_resource_requirements:
requests:
cpu: 100m
memory: 128Mi
# Customize CSRF options # Customize CSRF options
csrf_cookie_secure: False csrf_cookie_secure: False
@@ -319,6 +315,17 @@ redis_resource_requirements:
requests: requests:
cpu: 50m cpu: 50m
memory: 64Mi memory: 64Mi
rsyslog_resource_requirements:
requests:
cpu: 100m
memory: 128Mi
init_container_resource_requirements:
requests:
cpu: 100m
memory: 128Mi
# Add extra environment variables to the AWX task/web containers. Specify as # Add extra environment variables to the AWX task/web containers. Specify as
# literal block. E.g.: # literal block. E.g.:
# task_extra_env: | # task_extra_env: |
@@ -384,6 +391,12 @@ projects_existing_claim: ''
# Define postgres configuration arguments to use # Define postgres configuration arguments to use
postgres_extra_args: '' postgres_extra_args: ''
# Configure postgres connection keepalive
postgres_keepalives: true
postgres_keepalives_idle: 5
postgres_keepalives_interval: 5
postgres_keepalives_count: 5
# Define the storage_class, size and access_mode # Define the storage_class, size and access_mode
# when not using an existing claim # when not using an existing claim
projects_storage_size: 8Gi projects_storage_size: 8Gi
@@ -425,3 +438,10 @@ set_self_labels: true
# Disable web container's nginx ipv6 listener # Disable web container's nginx ipv6 listener
ipv6_disabled: false ipv6_disabled: false
# Set hostAliases on deployments
# hostAliases:
# - ip: 10.10.0.10
# hostnames:
# - hostname
host_aliases: ''

View File

@@ -16,11 +16,11 @@ data:
import socket import socket
# Import all so that extra_settings works properly # Import all so that extra_settings works properly
from django_auth_ldap.config import * from django_auth_ldap.config import *
def get_secret(): def get_secret():
if os.path.exists("/etc/tower/SECRET_KEY"): if os.path.exists("/etc/tower/SECRET_KEY"):
return open('/etc/tower/SECRET_KEY', 'rb').read().strip() return open('/etc/tower/SECRET_KEY', 'rb').read().strip()
ADMINS = () ADMINS = ()
STATIC_ROOT = '/var/lib/awx/public/static' STATIC_ROOT = '/var/lib/awx/public/static'
STATIC_URL = '{{ (ingress_path + '/static/').replace('//', '/') }}' STATIC_URL = '{{ (ingress_path + '/static/').replace('//', '/') }}'
@@ -59,20 +59,20 @@ data:
# Container environments don't like chroots # Container environments don't like chroots
AWX_PROOT_ENABLED = False AWX_PROOT_ENABLED = False
# Automatically deprovision pods that go offline # Automatically deprovision pods that go offline
AWX_AUTO_DEPROVISION_INSTANCES = True AWX_AUTO_DEPROVISION_INSTANCES = True
CLUSTER_HOST_ID = socket.gethostname() CLUSTER_HOST_ID = socket.gethostname()
SYSTEM_UUID = os.environ.get('MY_POD_UID', '00000000-0000-0000-0000-000000000000') SYSTEM_UUID = os.environ.get('MY_POD_UID', '00000000-0000-0000-0000-000000000000')
CSRF_COOKIE_SECURE = {{ csrf_cookie_secure | bool }} CSRF_COOKIE_SECURE = {{ csrf_cookie_secure | bool }}
SESSION_COOKIE_SECURE = {{ session_cookie_secure | bool }} SESSION_COOKIE_SECURE = {{ session_cookie_secure | bool }}
SERVER_EMAIL = 'root@localhost' SERVER_EMAIL = 'root@localhost'
DEFAULT_FROM_EMAIL = 'webmaster@localhost' DEFAULT_FROM_EMAIL = 'webmaster@localhost'
EMAIL_SUBJECT_PREFIX = '[AWX] ' EMAIL_SUBJECT_PREFIX = '[AWX] '
EMAIL_HOST = 'localhost' EMAIL_HOST = 'localhost'
EMAIL_PORT = 25 EMAIL_PORT = 25
EMAIL_HOST_USER = '' EMAIL_HOST_USER = ''
@@ -101,30 +101,30 @@ data:
default_type application/octet-stream; default_type application/octet-stream;
server_tokens off; server_tokens off;
client_max_body_size 5M; client_max_body_size 5M;
log_format main '$remote_addr - $remote_user [$time_local] "$request" ' log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" ' '$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"'; '"$http_user_agent" "$http_x_forwarded_for"';
access_log /dev/stdout main; access_log /dev/stdout main;
map $http_upgrade $connection_upgrade { map $http_upgrade $connection_upgrade {
default upgrade; default upgrade;
'' close; '' close;
} }
sendfile on; sendfile on;
#tcp_nopush on; #tcp_nopush on;
#gzip on; #gzip on;
upstream uwsgi { upstream uwsgi {
server 127.0.0.1:8050; server 127.0.0.1:8050;
} }
upstream daphne { upstream daphne {
server 127.0.0.1:8051; server 127.0.0.1:8051;
} }
{% if route_tls_termination_mechanism | lower == 'passthrough' %} {% if route_tls_termination_mechanism | lower == 'passthrough' %}
server { server {
@@ -163,30 +163,30 @@ data:
# If you have a domain name, this is where to add it # If you have a domain name, this is where to add it
server_name _; server_name _;
keepalive_timeout 65; keepalive_timeout 65;
# HSTS (ngx_http_headers_module is required) (15768000 seconds = 6 months) # HSTS (ngx_http_headers_module is required) (15768000 seconds = 6 months)
add_header Strict-Transport-Security max-age=15768000; add_header Strict-Transport-Security max-age=15768000;
# Protect against click-jacking https://www.owasp.org/index.php/Testing_for_Clickjacking_(OTG-CLIENT-009) # Protect against click-jacking https://www.owasp.org/index.php/Testing_for_Clickjacking_(OTG-CLIENT-009)
add_header X-Frame-Options "DENY"; add_header X-Frame-Options "DENY";
# Protect against MIME content sniffing https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options # Protect against MIME content sniffing https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options
add_header X-Content-Type-Options nosniff; add_header X-Content-Type-Options nosniff;
location /nginx_status { location /nginx_status {
stub_status on; stub_status on;
access_log off; access_log off;
allow 127.0.0.1; allow 127.0.0.1;
deny all; deny all;
} }
location {{ (ingress_path + '/static').replace('//', '/') }} { location {{ (ingress_path + '/static').replace('//', '/') }} {
alias /var/lib/awx/public/static/; alias /var/lib/awx/public/static/;
} }
location {{ (ingress_path + '/favicon.ico').replace('//', '/') }} { location {{ (ingress_path + '/favicon.ico').replace('//', '/') }} {
alias /var/lib/awx/public/static/media/favicon.ico; alias /var/lib/awx/public/static/media/favicon.ico;
} }
location {{ (ingress_path + '/websocket').replace('//', '/') }} { location {{ (ingress_path + '/websocket').replace('//', '/') }} {
# Pass request to the upstream alias # Pass request to the upstream alias
proxy_pass http://daphne; proxy_pass http://daphne;
@@ -208,7 +208,7 @@ data:
proxy_set_header Upgrade $http_upgrade; proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade; proxy_set_header Connection $connection_upgrade;
} }
location {{ ingress_path }} { location {{ ingress_path }} {
# Add trailing / if missing # Add trailing / if missing
rewrite ^(.*)$http_host(.*[^/])$ $1$http_host$2/ permanent; rewrite ^(.*)$http_host(.*[^/])$ $1$http_host$2/ permanent;
@@ -236,7 +236,7 @@ data:
bind 127.0.0.1 bind 127.0.0.1
receptor_conf: | receptor_conf: |
--- ---
- log-level: debug - log-level: info
- local-only: null - local-only: null
- node: - node:
firewallrules: firewallrules:
@@ -268,8 +268,8 @@ data:
cert: /etc/receptor/tls/receptor.crt cert: /etc/receptor/tls/receptor.crt
key: /etc/receptor/tls/receptor.key key: /etc/receptor/tls/receptor.key
name: tlsclient name: tlsclient
rootcas: /etc/receptor/tls/ca/receptor-ca.crt rootcas: /etc/receptor/tls/ca/mesh-CA.crt
mintls13: false mintls13: false
- work-signing: - work-signing:
privatekey: /etc/receptor/signing/work-private-key.pem privatekey: /etc/receptor/work_private_key.pem
tokenexpiration: 1m tokenexpiration: 1m

View File

@@ -59,6 +59,16 @@ spec:
- name: {{ secret }} - name: {{ secret }}
{% endfor %} {% endfor %}
{% endif %} {% endif %}
{% if host_aliases is defined and host_aliases | length > 0 %}
hostAliases:
{% for item in host_aliases %}
- ip: {{ item.ip }}
hostnames:
{% for hostname in item.hostnames %}
- {{ hostname }}
{% endfor %}
{% endfor %}
{% endif %}
{% if control_plane_priority_class is defined %} {% if control_plane_priority_class is defined %}
priorityClassName: '{{ control_plane_priority_class }}' priorityClassName: '{{ control_plane_priority_class }}'
{% endif %} {% endif %}
@@ -66,14 +76,14 @@ spec:
- name: init - name: init
image: '{{ _init_container_image }}' image: '{{ _init_container_image }}'
imagePullPolicy: '{{ image_pull_policy }}' imagePullPolicy: '{{ image_pull_policy }}'
resources: {{ task_resource_requirements }} resources: {{ init_container_resource_requirements }}
command: command:
- /bin/sh - /bin/sh
- -c - -c
- | - |
hostname=$MY_POD_NAME hostname=$MY_POD_NAME
receptor --cert-makereq bits=2048 commonname=$hostname dnsname=$hostname nodeid=$hostname outreq=/etc/receptor/tls/receptor.req outkey=/etc/receptor/tls/receptor.key receptor --cert-makereq bits=2048 commonname=$hostname dnsname=$hostname nodeid=$hostname outreq=/etc/receptor/tls/receptor.req outkey=/etc/receptor/tls/receptor.key
receptor --cert-signreq req=/etc/receptor/tls/receptor.req cacert=/etc/receptor/tls/ca/receptor-ca.crt cakey=/etc/receptor/tls/ca/receptor-ca.key outcert=/etc/receptor/tls/receptor.crt verify=yes receptor --cert-signreq req=/etc/receptor/tls/receptor.req cacert=/etc/receptor/tls/ca/mesh-CA.crt cakey=/etc/receptor/tls/ca/mesh-CA.key outcert=/etc/receptor/tls/receptor.crt verify=yes
{% if bundle_ca_crt %} {% if bundle_ca_crt %}
mkdir -p /etc/pki/ca-trust/extracted/{java,pem,openssl,edk2} mkdir -p /etc/pki/ca-trust/extracted/{java,pem,openssl,edk2}
update-ca-trust update-ca-trust
@@ -88,11 +98,11 @@ spec:
fieldPath: metadata.name fieldPath: metadata.name
volumeMounts: volumeMounts:
- name: "{{ ansible_operator_meta.name }}-receptor-ca" - name: "{{ ansible_operator_meta.name }}-receptor-ca"
mountPath: "/etc/receptor/tls/ca/receptor-ca.crt" mountPath: "/etc/receptor/tls/ca/mesh-CA.crt"
subPath: "tls.crt" subPath: "tls.crt"
readOnly: true readOnly: true
- name: "{{ ansible_operator_meta.name }}-receptor-ca" - name: "{{ ansible_operator_meta.name }}-receptor-ca"
mountPath: "/etc/receptor/tls/ca/receptor-ca.key" mountPath: "/etc/receptor/tls/ca/mesh-CA.key"
subPath: "tls.key" subPath: "tls.key"
readOnly: true readOnly: true
- name: "{{ ansible_operator_meta.name }}-receptor-tls" - name: "{{ ansible_operator_meta.name }}-receptor-tls"
@@ -112,6 +122,7 @@ spec:
- name: init-projects - name: init-projects
image: '{{ _init_projects_container_image }}' image: '{{ _init_projects_container_image }}'
imagePullPolicy: '{{ image_pull_policy }}' imagePullPolicy: '{{ image_pull_policy }}'
resources: {{ init_container_resource_requirements }}
command: command:
- /bin/sh - /bin/sh
- -c - -c
@@ -213,7 +224,7 @@ spec:
- name: "{{ ansible_operator_meta.name }}-receptor-config" - name: "{{ ansible_operator_meta.name }}-receptor-config"
mountPath: "/etc/receptor/" mountPath: "/etc/receptor/"
- name: "{{ ansible_operator_meta.name }}-receptor-work-signing" - name: "{{ ansible_operator_meta.name }}-receptor-work-signing"
mountPath: "/etc/receptor/signing/work-private-key.pem" mountPath: "/etc/receptor/work_private_key.pem"
subPath: "work-private-key.pem" subPath: "work-private-key.pem"
readOnly: true readOnly: true
- name: receptor-socket - name: receptor-socket
@@ -294,11 +305,11 @@ spec:
- name: "{{ ansible_operator_meta.name }}-receptor-config" - name: "{{ ansible_operator_meta.name }}-receptor-config"
mountPath: "/etc/receptor/" mountPath: "/etc/receptor/"
- name: "{{ ansible_operator_meta.name }}-receptor-ca" - name: "{{ ansible_operator_meta.name }}-receptor-ca"
mountPath: "/etc/receptor/tls/ca/receptor-ca.crt" mountPath: "/etc/receptor/tls/ca/mesh-CA.crt"
subPath: "tls.crt" subPath: "tls.crt"
readOnly: true readOnly: true
- name: "{{ ansible_operator_meta.name }}-receptor-work-signing" - name: "{{ ansible_operator_meta.name }}-receptor-work-signing"
mountPath: "/etc/receptor/signing/work-private-key.pem" mountPath: "/etc/receptor/work_private_key.pem"
subPath: "work-private-key.pem" subPath: "work-private-key.pem"
readOnly: true readOnly: true
- name: "{{ ansible_operator_meta.name }}-receptor-tls" - name: "{{ ansible_operator_meta.name }}-receptor-tls"
@@ -337,10 +348,11 @@ spec:
{% if rsyslog_command %} {% if rsyslog_command %}
command: {{ rsyslog_command }} command: {{ rsyslog_command }}
{% endif %} {% endif %}
{% if ryslog_args %} {% if rsyslog_args %}
args: {{ ryslog_args }} args: {{ rsyslog_args }}
{% endif %} {% endif %}
imagePullPolicy: '{{ image_pull_policy }}' imagePullPolicy: '{{ image_pull_policy }}'
resources: {{ rsyslog_resource_requirements }}
volumeMounts: volumeMounts:
- name: "{{ ansible_operator_meta.name }}-application-credentials" - name: "{{ ansible_operator_meta.name }}-application-credentials"
mountPath: "/etc/tower/conf.d/credentials.py" mountPath: "/etc/tower/conf.d/credentials.py"
@@ -369,6 +381,18 @@ spec:
{% if development_mode | bool %} {% if development_mode | bool %}
- name: awx-devel - name: awx-devel
mountPath: "/awx_devel" mountPath: "/awx_devel"
{% endif %}
{% if termination_grace_period_seconds is defined %}
- name: pre-stop-data
mountPath: /var/lib/pre-stop
- name: pre-stop-scripts
mountPath: /var/lib/pre-stop/scripts
lifecycle:
preStop:
exec:
command:
- bash
- /var/lib/pre-stop/scripts/termination-waiter
{% endif %} {% endif %}
env: env:
- name: SUPERVISOR_CONFIG_PATH - name: SUPERVISOR_CONFIG_PATH

View File

@@ -7,7 +7,7 @@ metadata:
labels: labels:
app.kubernetes.io/name: '{{ ansible_operator_meta.name }}-web' app.kubernetes.io/name: '{{ ansible_operator_meta.name }}-web'
{{ lookup("template", "../common/templates/labels/common.yaml.j2") | indent(width=4) | trim }} {{ lookup("template", "../common/templates/labels/common.yaml.j2") | indent(width=4) | trim }}
{{ lookup("template", "../common/templates/labels//version.yaml.j2") | indent(width=4) | trim }} {{ lookup("template", "../common/templates/labels/version.yaml.j2") | indent(width=4) | trim }}
spec: spec:
{% if web_replicas %} {% if web_replicas %}
replicas: {{ web_replicas }} replicas: {{ web_replicas }}
@@ -24,15 +24,14 @@ spec:
labels: labels:
app.kubernetes.io/name: '{{ ansible_operator_meta.name }}-web' app.kubernetes.io/name: '{{ ansible_operator_meta.name }}-web'
{{ lookup("template", "../common/templates/labels/common.yaml.j2") | indent(width=8) | trim }} {{ lookup("template", "../common/templates/labels/common.yaml.j2") | indent(width=8) | trim }}
{{ lookup("template", "../common/templates/labels//version.yaml.j2") | indent(width=8) | trim }} {{ lookup("template", "../common/templates/labels/version.yaml.j2") | indent(width=8) | trim }}
annotations: annotations:
{% for template in [ {% for template in [
"configmaps/config", "configmaps/config",
"configmaps/pre_stop_scripts",
"secrets/app_credentials", "secrets/app_credentials",
"storage/persistent", "storage/persistent",
] %} ] %}
checksum-{{ template | replace('/', '-') }}: "{{ lookup('template', template + '.yaml.j2') | md5 }}" checksum-{{ template | replace('/', '-') }}: "{{ lookup('template', template + '.yaml.j2') | sha1 }}"
{% endfor %} {% endfor %}
{% for secret in [ {% for secret in [
"bundle_cacert", "bundle_cacert",
@@ -42,7 +41,7 @@ spec:
"receptor_ca", "receptor_ca",
"receptor_work_signing", "receptor_work_signing",
] %} ] %}
checksum-secret-{{ secret }}: "{{ lookup('ansible.builtin.vars', secret, default='')["resources"][0]["data"] | default('') | md5 }}" checksum-secret-{{ secret }}: "{{ lookup('ansible.builtin.vars', secret, default='')["resources"][0]["data"] | default('') | sha1 }}"
{% endfor %} {% endfor %}
{% if web_annotations %} {% if web_annotations %}
{{ web_annotations | indent(width=8) }} {{ web_annotations | indent(width=8) }}
@@ -60,6 +59,16 @@ spec:
- name: {{ secret }} - name: {{ secret }}
{% endfor %} {% endfor %}
{% endif %} {% endif %}
{% if host_aliases is defined and host_aliases | length > 0 %}
hostAliases:
{% for item in host_aliases %}
- ip: {{ item.ip }}
hostnames:
{% for hostname in item.hostnames %}
- {{ hostname }}
{% endfor %}
{% endfor %}
{% endif %}
{% if control_plane_priority_class is defined %} {% if control_plane_priority_class is defined %}
priorityClassName: '{{ control_plane_priority_class }}' priorityClassName: '{{ control_plane_priority_class }}'
{% endif %} {% endif %}
@@ -68,6 +77,7 @@ spec:
- name: init - name: init
image: '{{ _init_container_image }}' image: '{{ _init_container_image }}'
imagePullPolicy: '{{ image_pull_policy }}' imagePullPolicy: '{{ image_pull_policy }}'
resources: {{ init_container_resource_requirements }}
command: command:
- /bin/sh - /bin/sh
- -c - -c
@@ -96,6 +106,7 @@ spec:
- name: init-projects - name: init-projects
image: '{{ _init_projects_container_image }}' image: '{{ _init_projects_container_image }}'
imagePullPolicy: '{{ image_pull_policy }}' imagePullPolicy: '{{ image_pull_policy }}'
resources: {{ init_container_resource_requirements }}
command: command:
- /bin/sh - /bin/sh
- -c - -c
@@ -198,15 +209,15 @@ spec:
mountPath: "/var/lib/awx/projects" mountPath: "/var/lib/awx/projects"
{% endif %} {% endif %}
- name: "{{ ansible_operator_meta.name }}-receptor-ca" - name: "{{ ansible_operator_meta.name }}-receptor-ca"
mountPath: "/etc/receptor/tls/ca/receptor-ca.crt" mountPath: "/etc/receptor/tls/ca/mesh-CA.crt"
subPath: "tls.crt" subPath: "tls.crt"
readOnly: true readOnly: true
- name: "{{ ansible_operator_meta.name }}-receptor-ca" - name: "{{ ansible_operator_meta.name }}-receptor-ca"
mountPath: "/etc/receptor/tls/ca/receptor-ca.key" mountPath: "/etc/receptor/tls/ca/mesh-CA.key"
subPath: "tls.key" subPath: "tls.key"
readOnly: true readOnly: true
- name: "{{ ansible_operator_meta.name }}-receptor-work-signing" - name: "{{ ansible_operator_meta.name }}-receptor-work-signing"
mountPath: "/etc/receptor/signing/work-public-key.pem" mountPath: "/etc/receptor/work_public_key.pem"
subPath: "work-public-key.pem" subPath: "work-public-key.pem"
readOnly: true readOnly: true
{% if development_mode | bool %} {% if development_mode | bool %}
@@ -244,8 +255,8 @@ spec:
{% if rsyslog_command %} {% if rsyslog_command %}
command: {{ rsyslog_command }} command: {{ rsyslog_command }}
{% endif %} {% endif %}
{% if ryslog_args %} {% if rsyslog_args %}
args: {{ ryslog_args }} args: {{ rsyslog_args }}
{% endif %} {% endif %}
imagePullPolicy: '{{ image_pull_policy }}' imagePullPolicy: '{{ image_pull_policy }}'
volumeMounts: volumeMounts:
@@ -284,6 +295,7 @@ spec:
- name: AWX_KUBE_DEVEL - name: AWX_KUBE_DEVEL
value: "1" value: "1"
{% endif %} {% endif %}
resources: {{ rsyslog_resource_requirements }}
{% if web_node_selector %} {% if web_node_selector %}
nodeSelector: nodeSelector:
{{ web_node_selector | indent(width=8) }} {{ web_node_selector | indent(width=8) }}

View File

@@ -34,7 +34,7 @@ spec:
port: port:
number: 80 number: 80
{% if ingress_controller|lower == "contour" %} {% if ingress_controller|lower == "contour" %}
- path: '{{ ingress_path }}/websocket' - path: '{{ ingress_path.rstrip("/") }}/websocket'
pathType: '{{ ingress_path_type }}' pathType: '{{ ingress_path_type }}'
backend: backend:
service: service:

View File

@@ -52,7 +52,7 @@ spec:
type: NodePort type: NodePort
{% elif service_type | lower == "loadbalancer" %} {% elif service_type | lower == "loadbalancer" %}
type: LoadBalancer type: LoadBalancer
{% if variable is defined and variable|length %} {% if loadbalancer_ip is defined and loadbalancer_ip|length %}
loadbalancerip: '{{ loadbalancer_ip }}' loadbalancerip: '{{ loadbalancer_ip }}'
{% endif %} {% endif %}
{% else %} {% else %}

View File

@@ -10,6 +10,14 @@ DATABASES = {
'OPTIONS': { 'sslmode': '{{ awx_postgres_sslmode }}', 'OPTIONS': { 'sslmode': '{{ awx_postgres_sslmode }}',
{% if awx_postgres_sslmode in ['verify-ca', 'verify-full'] %} {% if awx_postgres_sslmode in ['verify-ca', 'verify-full'] %}
'sslrootcert': '{{ ca_trust_bundle }}', 'sslrootcert': '{{ ca_trust_bundle }}',
{% endif %}
{% if postgres_keepalives %}
'keepalives': 1,
'keepalives_idle': {{ postgres_keepalives_idle }},
'keepalives_interval': {{ postgres_keepalives_interval }},
'keepalives_count': {{ postgres_keepalives_count }},
{% else %}
'keepalives': 0,
{% endif %} {% endif %}
}, },
} }

View File

@@ -17,6 +17,14 @@ cluster_name: 'cluster.local'
# Set no_log settings on certain tasks # Set no_log settings on certain tasks
no_log: true no_log: true
# Add a nodeSelector for the Postgres pods to backup.
# Specify as literal block. E.g.:
# db_management_pod_node_selector: |
# kubernetes.io/arch: amd64
# kubernetes.io/os: linux
db_management_pod_node_selector: ''
# Default resource requirements # Default resource requirements
restore_resource_requirements: restore_resource_requirements:
limits: limits:

View File

@@ -20,6 +20,10 @@ spec:
resources: resources:
{{ restore_resource_requirements | to_nice_yaml(indent=2) | indent(width=6, first=False) }} {{ restore_resource_requirements | to_nice_yaml(indent=2) | indent(width=6, first=False) }}
{%- endif %} {%- endif %}
{% if db_management_pod_node_selector %}
nodeSelector:
{{ db_management_pod_node_selector | indent(width=8) }}
{% endif %}
volumes: volumes:
- name: {{ ansible_operator_meta.name }}-backup - name: {{ ansible_operator_meta.name }}-backup
persistentVolumeClaim: persistentVolumeClaim: