Compare commits
84 Commits
2.14.0
...
uwsgi_conf
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6a2b42cdde | ||
|
|
bb4f4c2eb4 | ||
|
|
97efcab2a2 | ||
|
|
c08c1027a1 | ||
|
|
3d1ecc19f4 | ||
|
|
5d0f91ec13 | ||
|
|
6ab32a42cf | ||
|
|
9718424483 | ||
|
|
d5683adaf8 | ||
|
|
1bc342258a | ||
|
|
79ab6f0b5e | ||
|
|
3822e32755 | ||
|
|
c30d4c174d | ||
|
|
8a5ec6e19c | ||
|
|
d4de2d3c44 | ||
|
|
848cf17d0b | ||
|
|
ae86cb3d13 | ||
|
|
70ec7a5304 | ||
|
|
532be386fc | ||
|
|
0367516203 | ||
|
|
8bad25cbc7 | ||
|
|
f50c029408 | ||
|
|
4f87143719 | ||
|
|
f0a518baf6 | ||
|
|
8224b0b354 | ||
|
|
d42737993f | ||
|
|
a95815561a | ||
|
|
2b0221bbc6 | ||
|
|
36cf9c23ea | ||
|
|
041270ffbe | ||
|
|
9f917231a0 | ||
|
|
cdab3dd538 | ||
|
|
0444ae31db | ||
|
|
e5a24b8918 | ||
|
|
f9792d486e | ||
|
|
dd37ebd440 | ||
|
|
4a1e3c1075 | ||
|
|
4b6eb8df05 | ||
|
|
9fc3738b53 | ||
|
|
e3c2720681 | ||
|
|
23a3266b4a | ||
|
|
e271515385 | ||
|
|
13abaab1b3 | ||
|
|
01bde2cebb | ||
|
|
c696eda50a | ||
|
|
a260ab6873 | ||
|
|
9fa46bea43 | ||
|
|
8ead140541 | ||
|
|
6820981dd5 | ||
|
|
56df3279a6 | ||
|
|
64fb262830 | ||
|
|
5d99553fa6 | ||
|
|
cecf812382 | ||
|
|
3f0fd7f965 | ||
|
|
f27d7b28b8 | ||
|
|
a8da7f9398 | ||
|
|
4720d29fda | ||
|
|
64e4279d96 | ||
|
|
cf61205f49 | ||
|
|
e98c913f86 | ||
|
|
b49d68ca92 | ||
|
|
9638a2b284 | ||
|
|
4fc20de72e | ||
|
|
6fff7cb485 | ||
|
|
6baf3a174d | ||
|
|
ed72dc12b2 | ||
|
|
3fa60853a2 | ||
|
|
f8bbe9f55a | ||
|
|
c7c7171110 | ||
|
|
b7370d0e48 | ||
|
|
0b37f76225 | ||
|
|
e6e1025206 | ||
|
|
a5d5028dae | ||
|
|
413b7003a2 | ||
|
|
7b02b5df04 | ||
|
|
a5211fe511 | ||
|
|
fcbf394272 | ||
|
|
7bf49c207a | ||
|
|
3c70598704 | ||
|
|
80a9e8c156 | ||
|
|
dc0e86b823 | ||
|
|
07b8120788 | ||
|
|
a6e7a1bec3 | ||
|
|
809491bce0 |
10
.github/dependabot.yml
vendored
@@ -11,3 +11,13 @@ updates:
|
||||
labels:
|
||||
- "component:docs"
|
||||
- "dependencies"
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
groups:
|
||||
dependencies:
|
||||
patterns:
|
||||
- "*"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
labels:
|
||||
- "dependencies"
|
||||
|
||||
58
.github/workflows/ci.yaml
vendored
@@ -17,10 +17,11 @@ jobs:
|
||||
- -t replicas
|
||||
env:
|
||||
DOCKER_API_VERSION: "1.41"
|
||||
DEBUG_OUTPUT_DIR: /tmp/awx_operator_molecule_test
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-python@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.8"
|
||||
|
||||
@@ -37,58 +38,23 @@ jobs:
|
||||
MOLECULE_VERBOSITY: 3
|
||||
PY_COLORS: '1'
|
||||
ANSIBLE_FORCE_COLOR: '1'
|
||||
STORE_DEBUG_OUTPUT: true
|
||||
run: |
|
||||
sudo rm -f $(which kustomize)
|
||||
make kustomize
|
||||
KUSTOMIZE_PATH=$(readlink -f bin/kustomize) molecule test -s kind -- ${{ matrix.ansible_args }}
|
||||
helm:
|
||||
runs-on: ubuntu-latest
|
||||
name: helm
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Upload artifacts for failed tests if Run Molecule fails
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Create k8s Kind Cluster
|
||||
uses: helm/kind-action@v1.8.0
|
||||
|
||||
- name: Build operator image and load into kind
|
||||
run: |
|
||||
IMG=awx-operator-ci make docker-build
|
||||
kind load docker-image --name chart-testing awx-operator-ci
|
||||
|
||||
- name: Patch pull policy for tests
|
||||
run: |
|
||||
kustomize edit add patch --path ../testing/pull_policy/Never.yaml
|
||||
working-directory: config/default
|
||||
|
||||
- name: Build and lint helm chart
|
||||
run: |
|
||||
IMG=awx-operator-ci make helm-chart
|
||||
helm lint ./charts/awx-operator
|
||||
|
||||
- name: Install kubeval
|
||||
run: |
|
||||
mkdir tmp && cd tmp
|
||||
wget https://github.com/instrumenta/kubeval/releases/latest/download/kubeval-linux-amd64.tar.gz
|
||||
tar xf kubeval-linux-amd64.tar.gz
|
||||
sudo cp kubeval /usr/local/bin
|
||||
working-directory: ./charts
|
||||
|
||||
- name: Run kubeval
|
||||
run: |
|
||||
helm template -n awx awx-operator > tmp/test.yaml
|
||||
kubeval --strict --force-color --ignore-missing-schemas tmp/test.yaml
|
||||
working-directory: ./charts
|
||||
|
||||
- name: Install helm chart
|
||||
run: |
|
||||
helm install --wait my-awx-operator --namespace awx --create-namespace ./charts/awx-operator
|
||||
name: awx_operator_molecule_test
|
||||
path: ${{ env.DEBUG_OUTPUT_DIR }}
|
||||
no-log:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Check no_log statements
|
||||
run: |
|
||||
@@ -99,3 +65,5 @@ jobs:
|
||||
echo "${no_log}"
|
||||
exit 1
|
||||
fi
|
||||
nox-sessions:
|
||||
uses: ./.github/workflows/reusable-nox.yml
|
||||
|
||||
6
.github/workflows/devel.yaml
vendored
@@ -11,7 +11,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
name: Push devel image
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Fail if QUAY_REGISTRY not set
|
||||
run: |
|
||||
@@ -21,7 +21,7 @@ jobs:
|
||||
fi
|
||||
|
||||
- name: Log into registry ghcr.io
|
||||
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
|
||||
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
@@ -29,7 +29,7 @@ jobs:
|
||||
|
||||
|
||||
- name: Log into registry quay.io
|
||||
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
|
||||
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
|
||||
with:
|
||||
registry: ${{ vars.QUAY_REGISTRY }}
|
||||
username: ${{ secrets.QUAY_USER }}
|
||||
|
||||
2
.github/workflows/feature.yml
vendored
@@ -11,7 +11,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
name: Push devel image
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0 # needed so that git describe --tag works
|
||||
|
||||
|
||||
6
.github/workflows/label_issue.yml
vendored
@@ -14,7 +14,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Label Issue - Needs Triage
|
||||
uses: github/issue-labeler@v2.4.1
|
||||
uses: github/issue-labeler@v3.4
|
||||
with:
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
not-before: 2021-12-07T07:00:00Z
|
||||
@@ -26,8 +26,8 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
name: Label Issue - Community
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-python@v4
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
- name: Install python requests
|
||||
run: pip install requests
|
||||
- name: Check if user is a member of Ansible org
|
||||
|
||||
17
.github/workflows/label_pr.yml
vendored
@@ -12,10 +12,18 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
name: Label PR - Community
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-python@v4
|
||||
- name: Install python requests
|
||||
run: pip install requests
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-python@v5
|
||||
|
||||
- name: Create a virtual environment
|
||||
run: python3 -m venv venv
|
||||
|
||||
- name: Activate virtual environment and install dependencies
|
||||
run: |
|
||||
source venv/bin/activate
|
||||
pip3 install requests
|
||||
|
||||
- name: Check if user is a member of Ansible org
|
||||
uses: jannekem/run-python-script-action@v1
|
||||
id: check_user
|
||||
@@ -32,6 +40,7 @@ jobs:
|
||||
print("User is member")
|
||||
else:
|
||||
print("User is community")
|
||||
|
||||
- name: Add community label if not a member
|
||||
if: contains(steps.check_user.outputs.stdout, 'community')
|
||||
uses: andymckay/labeler@e6c4322d0397f3240f0e7e30a33b5c5df2d39e90
|
||||
|
||||
17
.github/workflows/promote.yaml
vendored
@@ -37,13 +37,13 @@ jobs:
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
depth: 0
|
||||
|
||||
|
||||
- name: Log into registry ghcr.io
|
||||
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
|
||||
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
@@ -51,7 +51,7 @@ jobs:
|
||||
|
||||
|
||||
- name: Log into registry quay.io
|
||||
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
|
||||
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
|
||||
with:
|
||||
registry: ${{ env.QUAY_REGISTRY }}
|
||||
username: ${{ secrets.QUAY_USER }}
|
||||
@@ -70,14 +70,3 @@ jobs:
|
||||
docker buildx imagetools create \
|
||||
ghcr.io/${{ github.repository }}:${{ env.TAG_NAME }} \
|
||||
--tag ${{ env.QUAY_REGISTRY }}/awx-operator:latest
|
||||
|
||||
|
||||
- name: Release Helm chart
|
||||
run: |
|
||||
ansible-playbook ansible/helm-release.yml -v \
|
||||
-e operator_image=${{ env.QUAY_REGISTRY }}/awx-operator \
|
||||
-e chart_owner=${{ github.repository_owner }} \
|
||||
-e tag=${{ env.TAG_NAME }} \
|
||||
-e gh_token=${{ secrets.GITHUB_TOKEN }} \
|
||||
-e gh_user=${{ github.actor }} \
|
||||
-e repo_type=https
|
||||
|
||||
26
.github/workflows/publish-helm.yml
vendored
@@ -1,26 +0,0 @@
|
||||
---
|
||||
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
|
||||
26
.github/workflows/reusable-nox.yml
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
---
|
||||
name: nox
|
||||
|
||||
"on":
|
||||
workflow_call:
|
||||
|
||||
jobs:
|
||||
nox:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- session: build
|
||||
python-versions: "3.11"
|
||||
name: "Run nox ${{ matrix.session }} session"
|
||||
steps:
|
||||
- name: Check out repo
|
||||
uses: actions/checkout@v4
|
||||
- name: Setup nox
|
||||
uses: wntrblm/nox@2024.04.15
|
||||
with:
|
||||
python-versions: "${{ matrix.python-versions }}"
|
||||
- name: "Run nox -s ${{ matrix.session }}"
|
||||
run: |
|
||||
nox -s "${{ matrix.session }}"
|
||||
4
.github/workflows/stage.yml
vendored
@@ -38,7 +38,7 @@ jobs:
|
||||
exit 0
|
||||
|
||||
- name: Checkout awx-operator
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: ${{ github.repository_owner }}/awx-operator
|
||||
path: awx-operator
|
||||
@@ -48,7 +48,7 @@ jobs:
|
||||
python3 -m pip install docker
|
||||
|
||||
- name: Log into registry ghcr.io
|
||||
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
|
||||
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
# Patterns to ignore when building packages.
|
||||
# This supports shell glob matching, relative path matching, and
|
||||
# negation (prefixed with !). Only one pattern per line.
|
||||
.DS_Store
|
||||
# Common VCS dirs
|
||||
.git/
|
||||
.gitignore
|
||||
.bzr/
|
||||
.bzrignore
|
||||
.hg/
|
||||
.hgignore
|
||||
.svn/
|
||||
# Common backup files
|
||||
*.swp
|
||||
*.bak
|
||||
*.tmp
|
||||
*.orig
|
||||
*~
|
||||
# Various IDEs
|
||||
.project
|
||||
.idea/
|
||||
*.tmproj
|
||||
.vscode/
|
||||
@@ -1,7 +0,0 @@
|
||||
---
|
||||
apiVersion: v2
|
||||
appVersion: 0.1.0
|
||||
description: A Helm chart for Kubernetes
|
||||
name: starter
|
||||
type: application
|
||||
version: 0.1.0
|
||||
@@ -1,366 +0,0 @@
|
||||
# AWX Operator Helm Chart
|
||||
|
||||
This chart installs the AWX Operator resources configured in [this](https://github.com/ansible/awx-operator) repository.
|
||||
|
||||
## Getting Started
|
||||
To configure your AWX resource using this chart, create your own `yaml` values file. The name is up to personal preference since it will explicitly be passed into the helm chart. Helm will merge whatever values you specify in your file with the default `values.yaml`, overriding any settings you've changed while allowing you to fall back on defaults. Because of this functionality, `values.yaml` should not be edited directly.
|
||||
|
||||
In your values config, enable `AWX.enabled` and add `AWX.spec` values based on the awx operator's [documentation](https://github.com/ansible/awx-operator/blob/devel/README.md). Consult the docs below for additional functionality.
|
||||
|
||||
### Installing
|
||||
|
||||
The operator's [helm install](https://ansible.readthedocs.io/projects/awx-operator/en/latest/installation/helm-install-on-existing-cluster.html) guide provides key installation instructions.
|
||||
|
||||
Example:
|
||||
|
||||
```bash
|
||||
helm install my-awx-operator awx-operator/awx-operator -n awx --create-namespace -f myvalues.yaml
|
||||
```
|
||||
|
||||
Argument breakdown:
|
||||
* `-f` passes in the file with your custom values
|
||||
* `-n` sets the namespace to be installed in
|
||||
* This value is accessed by `{{ $.Release.Namespace }}` in the templates
|
||||
* Acts as the default namespace for all unspecified resources
|
||||
* `--create-namespace` specifies that helm should create the namespace before installing
|
||||
|
||||
To update an existing installation, use `helm upgrade` instead of `install`. The rest of the syntax remains the same.
|
||||
|
||||
### Caveats on upgrading existing installation
|
||||
|
||||
There is no support at this time for upgrading or deleting CRDs using Helm. See [helm documentation](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/#some-caveats-and-explanations) for additional detail.
|
||||
|
||||
When upgrading to releases with CRD changes use the following command to update the CRDs
|
||||
|
||||
```bash
|
||||
kubectl apply --server-side -k github.com/ansible/awx-operator/config/crd?ref=<VERSION>
|
||||
```
|
||||
|
||||
If running above command results in an error like below:
|
||||
|
||||
```text
|
||||
Apply failed with 1 conflict: conflict with "helm" using apiextensions.k8s.io/v1: .spec.versions
|
||||
Please review the fields above--they currently have other managers. Here
|
||||
are the ways you can resolve this warning:
|
||||
* If you intend to manage all of these fields, please re-run the apply
|
||||
command with the `--force-conflicts` flag.
|
||||
* If you do not intend to manage all of the fields, please edit your
|
||||
manifest to remove references to the fields that should keep their
|
||||
current managers.
|
||||
* You may co-own fields by updating your manifest to match the existing
|
||||
value; in this case, you'll become the manager if the other manager(s)
|
||||
stop managing the field (remove it from their configuration).
|
||||
See https://kubernetes.io/docs/reference/using-api/server-side-apply/#conflicts
|
||||
```
|
||||
|
||||
Use `--force-conflicts` flag to resolve the conflict.
|
||||
|
||||
```bash
|
||||
kubectl apply --server-side --force-conflicts -k github.com/ansible/awx-operator/config/crd?ref=<VERSION>
|
||||
```
|
||||
|
||||
## Configuration
|
||||
The goal of adding helm configurations is to abstract out and simplify the creation of multi-resource configs. The `AWX.spec` field maps directly to the spec configs of the `AWX` resource that the operator provides, which are detailed in the [main README](https://github.com/ansible/awx-operator/blob/devel/README.md). Other sub-config can be added with the goal of simplifying more involved setups that require additional resources to be specified.
|
||||
|
||||
These sub-headers aim to be a more intuitive entrypoint into customizing your deployment, and are easier to manage in the long-term. By design, the helm templates will defer to the manually defined specs to avoid configuration conflicts. For example, if `AWX.spec.postgres_configuration_secret` is being used, the `AWX.postgres` settings will not be applied, even if enabled.
|
||||
|
||||
### External Postgres
|
||||
The `AWX.postgres` section simplifies the creation of the external postgres secret. If enabled, the configs provided will automatically be placed in a `postgres-config` secret and linked to the `AWX` resource. For proper secret management, the `AWX.postgres.password` value, and any other sensitive values, can be passed in at the command line rather than specified in code. Use the `--set` argument with `helm install`. Supplying the password this way is not recommended for production use, but may be helpful for initial PoC.
|
||||
|
||||
### Additional Kubernetes Resources
|
||||
The `AWX.extraDeploy` section allows the creation of additional Kubernetes resources. This simplifies setups requiring additional objects that are used by AWX, e.g. using `ExternalSecrets` to create Kubernetes secrets.
|
||||
|
||||
Resources are passed as an array, either as YAML or strings (literal "|"). The resources are passed through `tpl`, so templating is possible. Example:
|
||||
|
||||
```yaml
|
||||
AWX:
|
||||
# enable use of awx-deploy template
|
||||
...
|
||||
|
||||
# configurations for external postgres instance
|
||||
postgres:
|
||||
enabled: false
|
||||
...
|
||||
|
||||
extraDeploy:
|
||||
- |
|
||||
apiVersion: external-secrets.io/v1beta1
|
||||
kind: ExternalSecret
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-postgres-secret-string-example
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
app: {{ .Release.Name }}
|
||||
spec:
|
||||
secretStoreRef:
|
||||
name: vault
|
||||
kind: ClusterSecretStore
|
||||
refreshInterval: "1h"
|
||||
target:
|
||||
name: postgres-configuration-secret-string-example
|
||||
creationPolicy: "Owner"
|
||||
deletionPolicy: "Delete"
|
||||
dataFrom:
|
||||
- extract:
|
||||
key: awx/postgres-configuration-secret
|
||||
|
||||
- apiVersion: external-secrets.io/v1beta1
|
||||
kind: ExternalSecret
|
||||
metadata:
|
||||
name: "{{ .Release.Name }}-postgres-secret-yaml-example"
|
||||
namespace: "{{ .Release.Namespace }}"
|
||||
labels:
|
||||
app: "{{ .Release.Name }}"
|
||||
spec:
|
||||
secretStoreRef:
|
||||
name: vault
|
||||
kind: ClusterSecretStore
|
||||
refreshInterval: "1h"
|
||||
target:
|
||||
name: postgres-configuration-secret-yaml-example
|
||||
creationPolicy: "Owner"
|
||||
deletionPolicy: "Delete"
|
||||
dataFrom:
|
||||
- extract:
|
||||
key: awx/postgres-configuration-secret
|
||||
```
|
||||
|
||||
### Custom secrets
|
||||
The `customSecrets` section simplifies the creation of our custom secrets used during AWX deployment. Supplying the passwords this way is not recommended for production use, but may be helpful for initial PoC.
|
||||
|
||||
If enabled, the configs provided will automatically used to create the respective secrets and linked at the CR spec level. For proper secret management, the sensitive values can be passed in at the command line rather than specified in code. Use the `--set` argument with `helm install`.
|
||||
|
||||
Example:
|
||||
|
||||
```yaml
|
||||
AWX:
|
||||
# enable use of awx-deploy template
|
||||
...
|
||||
|
||||
# configurations for external postgres instance
|
||||
postgres:
|
||||
enabled: false
|
||||
...
|
||||
|
||||
customSecrets:
|
||||
enabled: true
|
||||
admin:
|
||||
enabled: true
|
||||
password: mysuperlongpassword
|
||||
secretName: my-admin-password
|
||||
secretKey:
|
||||
enabled: true
|
||||
key: supersecuresecretkey
|
||||
secretName: my-awx-secret-key
|
||||
ingressTls:
|
||||
enabled: true
|
||||
selfSignedCert: true
|
||||
key: unset
|
||||
certificate: unset
|
||||
routeTls:
|
||||
enabled: false
|
||||
key: <contentoftheprivatekey>
|
||||
certificate: <contentofthepublickey>
|
||||
ldapCacert:
|
||||
enabled: false
|
||||
crt: <contentofmybundlecacrt>
|
||||
ldap:
|
||||
enabled: true
|
||||
password: yourldapdnpassword
|
||||
bundleCacert:
|
||||
enabled: false
|
||||
crt: <contentofmybundlecacrt>
|
||||
eePullCredentials:
|
||||
enabled: false
|
||||
url: unset
|
||||
username: unset
|
||||
password: unset
|
||||
sslVerify: true
|
||||
secretName: my-ee-pull-credentials
|
||||
cpPullCredentials:
|
||||
enabled: false
|
||||
dockerconfig:
|
||||
- registry: https://index.docker.io/v1/
|
||||
username: unset
|
||||
password: unset
|
||||
secretName: my-cp-pull-credentials
|
||||
```
|
||||
|
||||
### Custom volumes
|
||||
The `customVolumes` section simplifies the creation of Persistent Volumes used when you want to store your databases and projects files on the cluster's Node. Since their backends are `hostPath`, the size specified are just like a label and there is no actual capacity limitation.
|
||||
|
||||
You have to prepare directories for these volumes. For example:
|
||||
|
||||
```bash
|
||||
sudo mkdir -p /data/postgres-13
|
||||
sudo mkdir -p /data/projects
|
||||
sudo chmod 755 /data/postgres-13
|
||||
sudo chown 1000:0 /data/projects
|
||||
```
|
||||
|
||||
Example:
|
||||
|
||||
```yaml
|
||||
AWX:
|
||||
# enable use of awx-deploy template
|
||||
...
|
||||
|
||||
# configurations for external postgres instance
|
||||
postgres:
|
||||
enabled: false
|
||||
...
|
||||
|
||||
customVolumes:
|
||||
postgres:
|
||||
enabled: true
|
||||
hostPath: /data/postgres-13
|
||||
projects:
|
||||
enabled: true
|
||||
hostPath: /data/projects
|
||||
size: 1Gi
|
||||
```
|
||||
|
||||
## Values Summary
|
||||
|
||||
### AWX
|
||||
| Value | Description | Default |
|
||||
|---|---|---|
|
||||
| `AWX.enabled` | Enable this AWX resource configuration | `false` |
|
||||
| `AWX.name` | The name of the AWX resource and default prefix for other resources | `"awx"` |
|
||||
| `AWX.spec` | specs to directly configure the AWX resource | `{}` |
|
||||
| `AWX.postgres` | configurations for the external postgres secret | - |
|
||||
|
||||
### extraDeploy
|
||||
| Value | Description | Default |
|
||||
|---|---|---|
|
||||
| `extraDeploy` | array of additional resources to be deployed (supports YAML or literal "\|") | - |
|
||||
|
||||
### customSecrets
|
||||
| Value | Description | Default |
|
||||
|---|---|---|
|
||||
| `customSecrets.enabled` | Enable the secret resources configuration | `false` |
|
||||
| `customSecrets.admin` | Configurations for the secret that contains the admin user password | - |
|
||||
| `customSecrets.secretKey` | Configurations for the secret that contains the symmetric key for encryption | - |
|
||||
| `customSecrets.ingressTls` | Configurations for the secret that contains the TLS information when `ingress_type=ingress` | - |
|
||||
| `customSecrets.routeTls` | Configurations for the secret that contains the TLS information when `ingress_type=route` (`route_tls_secret`) | - |
|
||||
| `customSecrets.ldapCacert` | Configurations for the secret that contains the LDAP Certificate Authority | - |
|
||||
| `customSecrets.ldap` | Configurations for the secret that contains the LDAP BIND DN password | - |
|
||||
| `customSecrets.bundleCacert` | Configurations for the secret that contains the Certificate Authority | - |
|
||||
| `customSecrets.eePullCredentials` | Configurations for the secret that contains the pull credentials for registered ees can be found | - |
|
||||
| `customSecrets.cpPullCredentials` | Configurations for the secret that contains the image pull credentials for app and database containers | - |
|
||||
|
||||
|
||||
Below the addition variables to customize the secret configuration.
|
||||
|
||||
#### Admin user password secret configuration
|
||||
| Value | Description | Default |
|
||||
|---|---|---|
|
||||
| `customSecrets.admin.enabled` | If `true`, secret will be created | `false` |
|
||||
| `customSecrets.admin.password` | Admin user password | - |
|
||||
| `customSecrets.admin.secretName` | Name of secret for `admin_password_secret` | `<resourcename>-admin-password>` |
|
||||
|
||||
#### Secret Key secret configuration
|
||||
| Value | Description | Default |
|
||||
|---|---|---|
|
||||
| `customSecrets.secretKey.enabled` | If `true`, secret will be created | `false` |
|
||||
| `customSecrets.secretKey.key` | Key is used to encrypt sensitive data in the database | - |
|
||||
| `customSecrets.secretKey.secretName` | Name of secret for `secret_key_secret` | `<resourcename>-secret-key` |
|
||||
|
||||
#### Ingress TLS secret configuration
|
||||
| Value | Description | Default |
|
||||
|---|---|---|
|
||||
| `customSecrets.ingressTls.enabled` | If `true`, secret will be created | `false` |
|
||||
| `customSecrets.ingressTls.selfSignedCert` | If `true`, an self-signed TLS certificate for `AWX.spec.hostname` will be create by helm | `false` |
|
||||
| `customSecrets.ingressTls.key` | Private key to use for TLS/SSL | - |
|
||||
| `customSecrets.ingressTls.certificate` | Certificate to use for TLS/SSL | - |
|
||||
| `customSecrets.ingressTls.secretName` | Name of secret for `ingress_tls_secret` | `<resourcename>-ingress-tls` |
|
||||
| `customSecrets.ingressTls.labels` | Array of labels for the secret | - |
|
||||
|
||||
#### Route TLS secret configuration
|
||||
| Value | Description | Default |
|
||||
|---|---|---|
|
||||
| `customSecrets.routeTls.enabled` | If `true`, secret will be created | `false` |
|
||||
| `customSecrets.routeTls.key` | Private key to use for TLS/SSL | - |
|
||||
| `customSecrets.routeTls.certificate` | Certificate to use for TLS/SSL | - |
|
||||
| `customSecrets.routeTls.secretName` | Name of secret for `route_tls_secret` | `<resourcename>-route-tls` |
|
||||
|
||||
#### LDAP Certificate Authority secret configuration
|
||||
| Value | Description | Default |
|
||||
|---|---|---|
|
||||
| `customSecrets.ldapCacert.enabled` | If `true`, secret will be created | `false` |
|
||||
| `customSecrets.ldapCacert.crt` | Bundle of CA Root Certificates | - |
|
||||
| `customSecrets.ldapCacert.secretName` | Name of secret for `ldap_cacert_secret` | `<resourcename>-custom-certs` |
|
||||
|
||||
#### LDAP BIND DN Password secret configuration
|
||||
| Value | Description | Default |
|
||||
|---|---|---|
|
||||
| `customSecrets.ldap.enabled` | If `true`, secret will be created | `false` |
|
||||
| `customSecrets.ldap.password` | LDAP BIND DN password | - |
|
||||
| `customSecrets.ldap.secretName` | Name of secret for `ldap_password_secret` | `<resourcename>-ldap-password` |
|
||||
|
||||
#### Certificate Authority secret configuration
|
||||
| Value | Description | Default |
|
||||
|---|---|---|
|
||||
| `customSecrets.bundleCacert.enabled` | If `true`, secret will be created | `false` |
|
||||
| `customSecrets.bundleCacert.crt` | Bundle of CA Root Certificates | - |
|
||||
| `customSecrets.bundleCacert.secretName` | Name of secret for `bundle_cacert_secret` | `<resourcename>-custom-certs` |
|
||||
|
||||
#### Default EE pull secrets configuration
|
||||
| Value | Description | Default |
|
||||
|---|---|---|
|
||||
| `customSecrets.eePullCredentials.enabled` | If `true`, secret will be created | `false` |
|
||||
| `customSecrets.eePullCredentials.url` | Registry url | - |
|
||||
| `customSecrets.eePullCredentials.username` | Username to connect as | - |
|
||||
| `customSecrets.eePullCredentials.password` | Password to connect with | - |
|
||||
| `customSecrets.eePullCredentials.sslVerify` | Whether verify ssl connection or not. | `true` |
|
||||
| `customSecrets.eePullCredentials.secretName` | Name of secret for `ee_pull_credentials_secret` | `<resourcename>-ee-pull-credentials` |
|
||||
|
||||
#### Control Plane pull secrets configuration
|
||||
| Value | Description | Default |
|
||||
|---|---|---|
|
||||
| `customSecrets.cpPullCredentials.enabled` | If `true`, secret will be created | `false` |
|
||||
| `customSecrets.cpPullCredentials.dockerconfig` | Array of configurations for the Docker credentials that are used for accessing a registry | - |
|
||||
| `customSecrets.cpPullCredentials.dockerconfig[].registry` | Server location for Docker registry | `https://index.docker.io/v1/` |
|
||||
| `customSecrets.cpPullCredentials.dockerconfig[].username` | Username to connect as | - |
|
||||
| `customSecrets.cpPullCredentials.dockerconfig[].password` | Password to connect with | - |
|
||||
| `customSecrets.cpPullCredentials.secretName` | Name of secret for `image_pull_secrets`| `<resoucename>-cp-pull-credentials` |
|
||||
|
||||
### customVolumes
|
||||
|
||||
#### Persistent Volume for databases postgres
|
||||
| Value | Description | Default |
|
||||
|---|---|---|
|
||||
| `customVolumes.postgres.enabled` | Enable the PV resource configuration for the postgres databases | `false` |
|
||||
| `customVolumes.postgres.hostPath` | Directory location on host | - |
|
||||
| `customVolumes.postgres.size` | Size of the volume | `8Gi` |
|
||||
| `customVolumes.postgres.accessModes` | Volume access mode | `ReadWriteOnce` |
|
||||
| `customVolumes.postgres.storageClassName` | PersistentVolume storage class name for `postgres_storage_class` | `<resourcename>-postgres-volume` |
|
||||
|
||||
#### Persistent Volume for projects files
|
||||
| Value | Description | Default |
|
||||
|---|---|---|
|
||||
| `customVolumes.projects.enabled` | Enable the PVC and PVC resources configuration for the projects files | `false` |
|
||||
| `customVolumes.projects.hostPath` | Directory location on host | - |
|
||||
| `customVolumes.projects.size` | Size of the volume | `8Gi` |
|
||||
| `customVolumes.projects.accessModes` | Volume access mode | `ReadWriteOnce` |
|
||||
| `customVolumes.postgres.storageClassName` | PersistentVolume storage class name | `<resourcename>-projects-volume` |
|
||||
|
||||
# Contributing
|
||||
|
||||
## Adding abstracted sections
|
||||
Where possible, defer to `AWX.spec` configs before applying the abstracted configs to avoid collision. This can be facilitated by the `(hasKey .spec what_i_will_abstract)` check.
|
||||
|
||||
## Building and Testing
|
||||
This chart is built using the Makefile in the [awx-operator repo](https://github.com/ansible/awx-operator). Clone the repo and run `make helm-chart`. This will create the awx-operator chart in the `charts/awx-operator` directory. In this process, the contents of the `.helm/starter` directory will be added to the chart.
|
||||
|
||||
## Future Goals
|
||||
All values under the `AWX` header are focused on configurations that use the operator. Configurations that relate to the Operator itself could be placed under an `Operator` heading, but that may add a layer of complication over current development.
|
||||
|
||||
|
||||
# Chart Publishing
|
||||
|
||||
The chart is currently hosted on the gh-pages branch of the repo. During the release pipeline, the `index.yaml` stored in that branch is generated with helm chart entries from all valid tags. We are currently unable to use the `chart-releaser` pipeline due to the fact that the complete helm chart is not committed to the repo and is instead built during the release process. Therefore, the cr action is unable to compare against previous versions.
|
||||
|
||||
Instead of CR, we use `helm repo index` to generate an index from all locally pulled chart versions. Since we build from scratch every time, the timestamps of all entries will be updated. This could be improved by using yq or something similar to detect which tags are already in the index.yaml file, and only merge in tags that are not present.
|
||||
|
||||
Not using CR could be addressed in the future by keeping the chart built as a part of releases, as long as CR compares the chart to previous release packages rather than previous commits. If the latter is the case, then we would not have the necessary history for comparison.
|
||||
@@ -1,6 +0,0 @@
|
||||
{{/*
|
||||
Generate the name of the postgres secret, expects AWX context passed in
|
||||
*/}}
|
||||
{{- define "postgres.secretName" -}}
|
||||
{{ default (printf "%s-postgres-configuration" .Values.AWX.name) .Values.AWX.postgres.secretName }}
|
||||
{{- end }}
|
||||
@@ -1,28 +0,0 @@
|
||||
{{- if $.Values.AWX.enabled }}
|
||||
{{- with .Values.AWX }}
|
||||
apiVersion: awx.ansible.com/v1beta1
|
||||
kind: AWX
|
||||
metadata:
|
||||
name: {{ .name }}
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
spec:
|
||||
{{- /* Provide custom persistent volumes configs if enabled */}}
|
||||
{{- include "spec.storageClassNames" $ }}
|
||||
{{- /* Provide custom secrets configs if enabled */}}
|
||||
{{- include "spec.secrets" $ }}
|
||||
{{- /* Include raw map from the values file spec */}}
|
||||
{{ .spec | toYaml | indent 2 }}
|
||||
{{- /* Provide security context defaults */}}
|
||||
{{- if not (hasKey .spec "security_context_settings") }}
|
||||
security_context_settings:
|
||||
runAsGroup: 0
|
||||
runAsUser: 0
|
||||
fsGroup: 0
|
||||
fsGroupChangePolicy: OnRootMismatch
|
||||
{{- end }}
|
||||
{{- /* Postgres configs if enabled and not already present */}}
|
||||
{{- if and .postgres.enabled (not (hasKey .spec "postgres_configuration_secret")) }}
|
||||
postgres_configuration_secret: {{ include "postgres.secretName" $ }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -1,8 +0,0 @@
|
||||
{{- range .Values.extraDeploy }}
|
||||
---
|
||||
{{- if typeIs "string" . }}
|
||||
{{- tpl . $ }}
|
||||
{{- else }}
|
||||
{{- tpl (. | toYaml | nindent 0) $ }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -1,18 +0,0 @@
|
||||
{{- if and $.Values.AWX.enabled $.Values.AWX.postgres.enabled }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ include "postgres.secretName" . }}
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
{{- with $.Values.AWX.postgres }}
|
||||
stringData:
|
||||
host: {{ .host }}
|
||||
port: {{ .port | quote }}
|
||||
database: {{ .dbName }}
|
||||
username: {{ .username }}
|
||||
password: {{ .password }}
|
||||
sslmode: {{ .sslmode }}
|
||||
type: {{ .type }}
|
||||
type: Opaque
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -1,170 +0,0 @@
|
||||
{{/*
|
||||
Generate certificates for ingress
|
||||
*/}}
|
||||
{{- define "ingress.gen-certs" -}}
|
||||
{{- $ca := genCA "ingress-ca" 365 -}}
|
||||
{{- $cert := genSignedCert ( $.Values.AWX.spec.hostname | required "AWX.spec.hostname is required!" ) nil nil 365 $ca -}}
|
||||
tls.crt: {{ $cert.Cert | b64enc }}
|
||||
tls.key: {{ $cert.Key | b64enc }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Generate the name of the secret that contains the admin user password
|
||||
*/}}
|
||||
{{- define "admin.secretName" -}}
|
||||
{{ default (printf "%s-admin-password" $.Values.AWX.name) (default $.Values.customSecrets.admin.secretName $.Values.AWX.spec.admin_password_secret) }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Generate the name of the secret that contains the TLS information when ingress_type=route
|
||||
*/}}
|
||||
{{- define "routeTls.secretName" -}}
|
||||
{{ default (printf "%s-route-tls" $.Values.AWX.name) (default $.Values.customSecrets.routeTls.secretName $.Values.AWX.spec.route_tls_secret) }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Generate the name of the secret that contains the TLS information when ingress_type=ingress
|
||||
*/}}
|
||||
{{- define "ingressTls.secretName" -}}
|
||||
{{ default (printf "%s-ingress-tls" $.Values.AWX.name) (default $.Values.customSecrets.ingressTls.secretName $.Values.AWX.spec.ingress_tls_secret) }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Generate the name of the secret that contains the LDAP Certificate Authority
|
||||
*/}}
|
||||
{{- define "ldapCacert.secretName" -}}
|
||||
{{ default (printf "%s-custom-certs" $.Values.AWX.name) (default ($.Values.customSecrets.ldapCacert).secretName $.Values.AWX.spec.ldap_cacert_secret) }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Generate the name of the secret that contains the custom Certificate Authority
|
||||
*/}}
|
||||
{{- define "bundleCacert.secretName" -}}
|
||||
{{ default (printf "%s-custom-certs" $.Values.AWX.name) (default ($.Values.customSecrets.bundleCacert).secretName $.Values.AWX.spec.bundle_cacert_secret) }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Generate the name of the secret that contains the LDAP BIND DN password
|
||||
*/}}
|
||||
{{- define "ldap.secretName" -}}
|
||||
{{ default (printf "%s-ldap-password" $.Values.AWX.name) (default $.Values.customSecrets.ldap.secretName $.Values.AWX.spec.ldap_password_secret) }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Generate the name of the secret that contains the symmetric key for encryption
|
||||
*/}}
|
||||
{{- define "secretKey.secretName" -}}
|
||||
{{ default (printf "%s-secret-key" $.Values.AWX.name) (default $.Values.customSecrets.secretKey.secretName $.Values.AWX.spec.secret_key_secret) }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Generate the name of the secret that contains the default execution environment pull credentials
|
||||
*/}}
|
||||
{{- define "eePullCredentials.secretName" -}}
|
||||
{{ default (printf "%s-ee-pull-credentials" $.Values.AWX.name) (default $.Values.customSecrets.eePullCredentials.secretName $.Values.AWX.spec.ee_pull_credentials_secret) }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Generate the name of the secret that contains the default control plane pull credentials
|
||||
*/}}
|
||||
{{- define "cpPullCredentials.secretName" -}}
|
||||
{{ default (printf "%s-cp-pull-credentials" $.Values.AWX.name) (default $.Values.customSecrets.cpPullCredentials.secretName $.Values.AWX.spec.image_pull_secrets) }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Generate the .dockerconfigjson file unencoded.
|
||||
*/}}
|
||||
{{- define "dockerconfigjson.b64dec" }}
|
||||
{{- print "{\"auths\":{" }}
|
||||
{{- range $index, $item := . }}
|
||||
{{- if $index }}
|
||||
{{- print "," }}
|
||||
{{- end }}
|
||||
{{- printf "\"%s\":{\"username\":\"%s\",\"password\":\"%s\",\"email\":\"%s\",\"auth\":\"%s\"}" (default "https://index.docker.io/v1/" $item.registry) $item.username $item.password (default "" $item.email) (printf "%s:%s" $item.username $item.password | b64enc) }}
|
||||
{{- end }}
|
||||
{{- print "}}" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Generate the base64-encoded .dockerconfigjson.
|
||||
*/}}
|
||||
{{- define "dockerconfigjson.b64enc" }}
|
||||
{{- $list := ternary (list .) . (kindIs "map" .) }}
|
||||
{{- include "dockerconfigjson.required" $list }}
|
||||
{{- include "dockerconfigjson.b64dec" $list | b64enc }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Required values for .dockerconfigjson
|
||||
*/}}
|
||||
{{- define "dockerconfigjson.required" -}}
|
||||
{{- range . -}}
|
||||
{{- $_ := required "cpPullCredentials.dockerconfigjson[].username is required!" .username -}}
|
||||
{{- $_ := required "cpPullCredentials.dockerconfigjson[].password is required!" .password -}}
|
||||
{{- end -}}
|
||||
{{/* Check for registry uniqueness */}}
|
||||
{{- $registries := list -}}
|
||||
{{- range . -}}
|
||||
{{- $registries = append $registries (default "https://index.docker.io/v1/" .registry) -}}
|
||||
{{- end -}}
|
||||
{{- $_ := required "All cpPullCredentials.dockerconfigjson[].registry's must be unique!" (or (eq (len $registries) (len ($registries | uniq))) nil) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Generate the name of the secrets
|
||||
*/}}
|
||||
{{- define "spec.secrets" -}}
|
||||
{{- /* secret configs if enabled */}}
|
||||
{{- if hasKey $.Values "customSecrets" }}
|
||||
{{- with $.Values.customSecrets }}
|
||||
{{- if .enabled }}
|
||||
{{- if hasKey . "admin" }}
|
||||
{{- if and (not (hasKey $.Values.AWX.spec "admin_password_secret")) .admin.enabled }}
|
||||
admin_password_secret: {{ include "admin.secretName" $ }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if hasKey . "secretKey" }}
|
||||
{{- if and (not (hasKey $.Values.AWX.spec "secret_key_secret")) .secretKey.enabled }}
|
||||
secret_key_secret: {{ include "secretKey.secretName" $ }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if hasKey . "routeTls" }}
|
||||
{{- if and (not (hasKey $.Values.AWX.spec "route_tls_secret")) .routeTls.enabled }}
|
||||
route_tls_secret: {{ include "routeTls.secretName" $ }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if hasKey . "ingressTls" }}
|
||||
{{- if and (not (hasKey $.Values.AWX.spec "ingress_tls_secret")) .ingressTls.enabled }}
|
||||
ingress_tls_secret: {{ include "ingressTls.secretName" $ }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if hasKey . "ldapCacert" }}
|
||||
{{- if and (not (hasKey $.Values.AWX.spec "ldap_cacert_secret")) .ldapCacert.enabled }}
|
||||
ldap_cacert_secret: {{ include "ldapCacert.secretName" $ }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if hasKey . "bundleCacert" }}
|
||||
{{- if and (not (hasKey $.Values.AWX.spec "bundle_cacert_secret")) .bundleCacert.enabled }}
|
||||
bundle_cacert_secret: {{ include "bundleCacert.secretName" $ }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if hasKey . "ldap" }}
|
||||
{{- if and (not (hasKey $.Values.AWX.spec "ldap_password_secret")) .ldap.enabled }}
|
||||
ldap_password_secret: {{ include "ldap.secretName" $ }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if hasKey . "eePullCredentials" }}
|
||||
{{- if and (not (hasKey $.Values.AWX.spec "ee_pull_credentials_secret")) .eePullCredentials.enabled }}
|
||||
ee_pull_credentials_secret: {{ include "eePullCredentials.secretName" $ }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if hasKey . "cpPullCredentials" }}
|
||||
{{- if and (not (hasKey $.Values.AWX.spec "image_pull_secrets")) .cpPullCredentials.enabled }}
|
||||
image_pull_secrets:
|
||||
- {{ include "cpPullCredentials.secretName" $ }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -1,16 +0,0 @@
|
||||
{{- if ($.Values.customSecrets).enabled }}
|
||||
{{- if hasKey .Values.customSecrets "admin" }}
|
||||
{{- with $.Values.customSecrets.admin }}
|
||||
{{- if .enabled }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ include "admin.secretName" $ }}
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
type: Opaque
|
||||
data:
|
||||
password: {{ .password | required "customSecrets.admin.password is required!" | b64enc }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -1,16 +0,0 @@
|
||||
{{- if ($.Values.customSecrets).enabled }}
|
||||
{{- if hasKey .Values.customSecrets "cpPullCredentials" }}
|
||||
{{- with $.Values.customSecrets.cpPullCredentials }}
|
||||
{{- if .enabled }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ include "cpPullCredentials.secretName" $ }}
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
type: kubernetes.io/dockerconfigjson
|
||||
data:
|
||||
.dockerconfigjson: {{ template "dockerconfigjson.b64enc" .dockerconfig | required "customSecrets.cpPullCredentials.dockerconfig is required!" }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -1,49 +0,0 @@
|
||||
{{- if ($.Values.customSecrets).enabled }}
|
||||
{{- with .Values.customSecrets }}
|
||||
{{- $hasLdapCrt := (hasKey $.Values.customSecrets "ldapCacert") -}}
|
||||
{{- $hasBundleCrt := (hasKey . "bundleCacert") -}}
|
||||
{{- if or $hasLdapCrt $hasBundleCrt }}
|
||||
{{- $ldapCrtEnabled := ternary (.ldapCacert).enabled false $hasLdapCrt -}}
|
||||
{{- $bundleCrtEnabled := ternary (.bundleCacert).enabled false $hasBundleCrt -}}
|
||||
{{- $ldapSecretName := (include "ldapCacert.secretName" $) -}}
|
||||
{{- $bundleSecretName := (include "bundleCacert.secretName" $) -}}
|
||||
{{- if and (or $bundleCrtEnabled $ldapCrtEnabled) (eq $ldapSecretName $bundleSecretName) }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ $ldapSecretName }}
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
type: Opaque
|
||||
data:
|
||||
{{- if $ldapCrtEnabled }}
|
||||
ldap-ca.crt: {{ .ldapCacert.crt | required "customSecrets.ldapCacert.crt is required!" | b64enc }}
|
||||
{{- end }}
|
||||
{{- if $bundleCrtEnabled }}
|
||||
bundle-ca.crt: {{ .bundleCacert.crt | required "customSecrets.bundleCacert.crt is required!" | b64enc }}
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
{{- if $ldapCrtEnabled }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ $ldapSecretName }}
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
type: Opaque
|
||||
data:
|
||||
ldap-ca.crt: {{ .ldapCacert.crt | required "customSecrets.ldapCacert.crt is required!" | b64enc }}
|
||||
{{- end }}
|
||||
{{- if $bundleCrtEnabled }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ $bundleSecretName }}
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
type: Opaque
|
||||
data:
|
||||
bundle-ca.crt: {{ .bundleCacert.crt | required "customSecrets.bundleCacert.crt is required!" | b64enc }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -1,19 +0,0 @@
|
||||
{{- if ($.Values.customSecrets).enabled }}
|
||||
{{- if hasKey .Values.customSecrets "eePullCredentials" }}
|
||||
{{- with $.Values.customSecrets.eePullCredentials }}
|
||||
{{- if .enabled }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ include "eePullCredentials.secretName" $ }}
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
type: Opaque
|
||||
stringData:
|
||||
url: {{ (required "customSecrets.eePullCredentials.url is required!" .url) | quote }}
|
||||
username: {{ (required "customSecrets.eePullCredentials.username is required!" .username) | quote }}
|
||||
password: {{ (required "customSecrets.eePullCredentials.password is required!" .password) | quote }}
|
||||
ssl_verify: {{ or .sslVerify (eq (.sslVerify | toString) "<nil>") | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -1,25 +0,0 @@
|
||||
{{- if ($.Values.customSecrets).enabled }}
|
||||
{{- if hasKey .Values.customSecrets "ingressTls" }}
|
||||
{{- with $.Values.customSecrets.ingressTls }}
|
||||
{{- if .enabled }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ include "ingressTls.secretName" $ }}
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
{{- if .labels }}
|
||||
labels:
|
||||
{{ toYaml .labels | indent 4 }}
|
||||
{{- end }}
|
||||
type: kubernetes.io/tls
|
||||
data:
|
||||
{{- if .selfSignedCert }}
|
||||
{{ ( include "ingress.gen-certs" $ ) | indent 2 }}
|
||||
{{ else }}
|
||||
tls.key: {{ (.key | required "customSecrets.ingressTls.key is required!") | b64enc }}
|
||||
tls.crt: {{ (.certificate | required "customSecrets.ingressTls.certificate is required!") | b64enc }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -1,16 +0,0 @@
|
||||
{{- if ($.Values.customSecrets).enabled }}
|
||||
{{- if hasKey .Values.customSecrets "ldap" }}
|
||||
{{- with $.Values.customSecrets.ldap }}
|
||||
{{- if .enabled }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ include "ldap.secretName" $ }}
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
type: Opaque
|
||||
data:
|
||||
ldap-password: {{ .password | required "customSecrets.ldap.password is required!" | b64enc }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -1,17 +0,0 @@
|
||||
{{- if ($.Values.customSecrets).enabled }}
|
||||
{{- if hasKey .Values.customSecrets "routeTls" }}
|
||||
{{- with $.Values.customSecrets.routeTls }}
|
||||
{{- if .enabled }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ include "routeTls.secretName" $ }}
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
type: kubernetes.io/tls
|
||||
data:
|
||||
tls.key: {{ (.key | required "customSecrets.routeTls.key is required!") | b64enc }}
|
||||
tls.crt: {{ (.certificate | required "customSecrets.routeTls.certificate is required!") | b64enc }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -1,16 +0,0 @@
|
||||
{{- if ($.Values.customSecrets).enabled }}
|
||||
{{- if hasKey .Values.customSecrets "secretKey" }}
|
||||
{{- with $.Values.customSecrets.secretKey }}
|
||||
{{- if .enabled }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ include "secretKey.secretName" $ }}
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
type: Opaque
|
||||
stringData:
|
||||
secret_key: {{ .key | required "customSecrets.secretKey.key is required!" | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -1,57 +0,0 @@
|
||||
{{/*
|
||||
Generate the name of the persistent volume for postgres folders
|
||||
*/}}
|
||||
{{- define "postgres.persistentVolumeName" -}}
|
||||
{{ printf "%s-postgres-volume" $.Values.AWX.name }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Generate the name of the persistent volume for projects folder
|
||||
*/}}
|
||||
{{- define "projects.persistentVolumeName" -}}
|
||||
{{ printf "%s-projects-volume" $.Values.AWX.name }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Generate the name of the persistent volume claim for the projects volume
|
||||
*/}}
|
||||
{{- define "projects.persistentVolumeClaim" -}}
|
||||
{{ printf "%s-projects-claim" $.Values.AWX.name }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Generate the name of the storage class to use for the postgres volume
|
||||
*/}}
|
||||
{{- define "postgres.storageClassName" -}}
|
||||
{{ default (printf "%s-postgres-volume" $.Values.AWX.name) (default $.Values.AWX.spec.postgres_storage_class (($.Values.customVolumes).postgres).storageClassName) }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Generate the name of the storage class to use for the projects volume
|
||||
*/}}
|
||||
{{- define "projects.storageClassName" -}}
|
||||
{{ default (printf "%s-projects-volume" $.Values.AWX.name) (default $.Values.AWX.spec.projects_storage_class (($.Values.customVolumes).projects).storageClassName) }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Generate the name of the storage class names, expects AWX context passed in
|
||||
*/}}
|
||||
{{- define "spec.storageClassNames" -}}
|
||||
{{- if and (not $.Values.AWX.postgres.enabled) (eq (($.Values.AWX.spec).postgres_configuration_secret | default "") "") -}}
|
||||
{{- if (($.Values.customVolumes).postgres).enabled -}}
|
||||
{{- if not (hasKey $.Values.AWX.spec "postgres_storage_class") }}
|
||||
postgres_storage_class: {{ include "postgres.storageClassName" $ }}
|
||||
{{- end }}
|
||||
{{- if not (hasKey $.Values.AWX.spec "postgres_storage_requirements") }}
|
||||
postgres_storage_requirements:
|
||||
requests:
|
||||
storage: {{ default "8Gi" $.Values.customVolumes.postgres.size | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if and ($.Values.AWX.spec.projects_persistence) (eq (($.Values.AWX.spec).projects_existing_claim | default "") "") -}}
|
||||
{{- if (($.Values.customVolumes).projects).enabled }}
|
||||
projects_existing_claim: {{ include "projects.persistentVolumeClaim" $ }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -1,19 +0,0 @@
|
||||
{{- if and (not $.Values.AWX.postgres.enabled) (eq (($.Values.AWX.spec).postgres_configuration_secret | default "") "") -}}
|
||||
{{- if (($.Values.customVolumes).postgres).enabled -}}
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: {{ include "postgres.persistentVolumeName" $ }}
|
||||
{{- with $.Values.customVolumes.postgres }}
|
||||
spec:
|
||||
accessModes:
|
||||
- {{ default "ReadWriteOnce" .accessModes }}
|
||||
persistentVolumeReclaimPolicy: {{ default "Retain" .reclaimPolicy | quote }}
|
||||
capacity:
|
||||
storage: {{ default "8Gi" .size | quote }}
|
||||
storageClassName: {{ include "postgres.storageClassName" $ }}
|
||||
hostPath:
|
||||
path: {{ required "customVolumes.postgres.hostPath or spec.postgres_data_path are required!" (default ($.Values.AWX.spec).postgres_data_path .hostPath) | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -1,32 +0,0 @@
|
||||
{{- if and ($.Values.AWX.spec.projects_persistence) (eq (($.Values.AWX.spec).projects_existing_claim | default "") "") -}}
|
||||
{{- if (($.Values.customVolumes).projects).enabled -}}
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: {{ include "projects.persistentVolumeName" $ }}
|
||||
{{- with $.Values.customVolumes.projects }}
|
||||
spec:
|
||||
accessModes:
|
||||
- {{ default "ReadWriteOnce" (default $.Values.AWX.spec.projects_storage_access_mode .accessModes) }}
|
||||
persistentVolumeReclaimPolicy: {{ default "Retain" .reclaimPolicy | quote }}
|
||||
capacity:
|
||||
storage: {{ default "8Gi" (default $.Values.AWX.spec.projects_storage_size .size) | quote }}
|
||||
storageClassName: {{ include "projects.storageClassName" $ }}
|
||||
hostPath:
|
||||
path: {{ required "customVolumes.projects.hostPath is required!" .hostPath | quote }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: {{ include "projects.persistentVolumeClaim" $ }}
|
||||
spec:
|
||||
accessModes:
|
||||
- {{ default "ReadWriteOnce" (default $.Values.AWX.spec.projects_storage_access_mode .accessModes) }}
|
||||
volumeMode: Filesystem
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ default "8Gi" (default $.Values.AWX.spec.projects_storage_size .size) | quote }}
|
||||
storageClassName: {{ include "projects.storageClassName" $ }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -1,19 +0,0 @@
|
||||
AWX:
|
||||
# enable use of awx-deploy template
|
||||
enabled: false
|
||||
name: awx
|
||||
spec:
|
||||
admin_user: admin
|
||||
|
||||
# configurations for external postgres instance
|
||||
postgres:
|
||||
enabled: false
|
||||
host: Unset
|
||||
port: 5678
|
||||
dbName: Unset
|
||||
username: admin
|
||||
# for secret management, pass in the password independently of this file
|
||||
# at the command line, use --set AWX.postgres.password
|
||||
password: Unset
|
||||
sslmode: prefer
|
||||
type: unmanaged
|
||||
@@ -6,7 +6,6 @@ ignore: |
|
||||
kustomization.yaml
|
||||
awx-operator.clusterserviceversion.yaml
|
||||
bundle
|
||||
.helm/starter
|
||||
hacking/
|
||||
|
||||
rules:
|
||||
|
||||
@@ -10,6 +10,7 @@ Have questions about this document or anything not covered here? Please file a n
|
||||
- [Table of contents](#table-of-contents)
|
||||
- [Things to know prior to submitting code](#things-to-know-prior-to-submitting-code)
|
||||
- [Submmiting your work](#submmiting-your-work)
|
||||
- [Development](#development)
|
||||
- [Testing](#testing)
|
||||
- [Testing in Kind](#testing-in-kind)
|
||||
- [Testing in Minikube](#testing-in-minikube)
|
||||
@@ -42,7 +43,8 @@ Have questions about this document or anything not covered here? Please file a n
|
||||
|
||||
**Note**: If you have multiple commits, make sure to `squash` your commits into a single commit which will facilitate our release process.
|
||||
|
||||
|
||||
## Development
|
||||
The development environment consists of running an [`up.sh`](./up.sh) and a [`down.sh`](./down.sh) script, which applies or deletes yaml on the Openshift or K8s cluster you are connected to. See the [development.md](docs/development.md) for information on how to deploy and test changes from your branch.
|
||||
|
||||
## Testing
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM quay.io/operator-framework/ansible-operator:v1.34.0
|
||||
FROM quay.io/operator-framework/ansible-operator:v1.34.2
|
||||
|
||||
USER root
|
||||
RUN dnf update --security --bugfix -y && \
|
||||
|
||||
203
Makefile
@@ -8,13 +8,6 @@ PREV_VERSION ?= $(shell git describe --abbrev=0 --tags $(shell git rev-list --ta
|
||||
|
||||
CONTAINER_CMD ?= docker
|
||||
|
||||
# GNU vs BSD in-place sed
|
||||
ifeq ($(shell sed --version 2>/dev/null | grep -q GNU && echo gnu),gnu)
|
||||
SED_I := sed -i
|
||||
else
|
||||
SED_I := sed -i ''
|
||||
endif
|
||||
|
||||
# CHANNELS define the bundle channels used in the bundle.
|
||||
# Add a new line here if you would like to change its default config. (E.g CHANNELS = "candidate,fast,stable")
|
||||
# To re-generate a bundle for other specific channels without changing the standard setup, you can:
|
||||
@@ -60,15 +53,6 @@ endif
|
||||
IMG ?= $(IMAGE_TAG_BASE):$(VERSION)
|
||||
NAMESPACE ?= awx
|
||||
|
||||
# Helm variables
|
||||
CHART_NAME ?= awx-operator
|
||||
CHART_DESCRIPTION ?= A Helm chart for the AWX Operator
|
||||
CHART_OWNER ?= $(GH_REPO_OWNER)
|
||||
CHART_REPO ?= awx-operator
|
||||
CHART_BRANCH ?= gh-pages
|
||||
CHART_DIR ?= gh-pages
|
||||
CHART_INDEX ?= index.yaml
|
||||
|
||||
.PHONY: all
|
||||
all: docker-build
|
||||
|
||||
@@ -177,7 +161,7 @@ ifeq (,$(shell which operator-sdk 2>/dev/null))
|
||||
@{ \
|
||||
set -e ;\
|
||||
mkdir -p $(dir $(OPERATOR_SDK)) ;\
|
||||
curl -sSLo $(OPERATOR_SDK) https://github.com/operator-framework/operator-sdk/releases/download/v1.33.0/operator-sdk_$(OS)_$(ARCHA) ;\
|
||||
curl -sSLo $(OPERATOR_SDK) https://github.com/operator-framework/operator-sdk/releases/download/v1.34.2/operator-sdk_$(OS)_$(ARCHA) ;\
|
||||
chmod +x $(OPERATOR_SDK) ;\
|
||||
}
|
||||
else
|
||||
@@ -255,188 +239,3 @@ catalog-build: opm ## Build a catalog image.
|
||||
.PHONY: catalog-push
|
||||
catalog-push: ## Push a catalog image.
|
||||
$(MAKE) docker-push IMG=$(CATALOG_IMG)
|
||||
|
||||
.PHONY: kubectl-slice
|
||||
KUBECTL_SLICE = $(shell pwd)/bin/kubectl-slice
|
||||
kubectl-slice: ## Download kubectl-slice locally if necessary.
|
||||
ifeq (,$(wildcard $(KUBECTL_SLICE)))
|
||||
ifeq (,$(shell which kubectl-slice 2>/dev/null))
|
||||
@{ \
|
||||
set -e ;\
|
||||
mkdir -p $(dir $(KUBECTL_SLICE)) ;\
|
||||
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 ;\
|
||||
}
|
||||
else
|
||||
KUBECTL_SLICE = $(shell which kubectl-slice)
|
||||
endif
|
||||
endif
|
||||
|
||||
.PHONY: helm
|
||||
HELM = $(shell pwd)/bin/helm
|
||||
helm: ## Download helm locally if necessary.
|
||||
ifeq (,$(wildcard $(HELM)))
|
||||
ifeq (,$(shell which helm 2>/dev/null))
|
||||
@{ \
|
||||
set -e ;\
|
||||
mkdir -p $(dir $(HELM)) ;\
|
||||
curl -sSLo - https://get.helm.sh/helm-v3.8.0-$(OS)-$(ARCHA).tar.gz | \
|
||||
tar xzf - -C bin/ $(OS)-$(ARCHA)/helm ;\
|
||||
mv bin/$(OS)-$(ARCHA)/helm bin/helm ;\
|
||||
rmdir bin/$(OS)-$(ARCHA) ;\
|
||||
}
|
||||
else
|
||||
HELM = $(shell which helm)
|
||||
endif
|
||||
endif
|
||||
|
||||
.PHONY: yq
|
||||
YQ = $(shell pwd)/bin/yq
|
||||
yq: ## Download yq locally if necessary.
|
||||
ifeq (,$(wildcard $(YQ)))
|
||||
ifeq (,$(shell which yq 2>/dev/null))
|
||||
@{ \
|
||||
set -e ;\
|
||||
mkdir -p $(dir $(HELM)) ;\
|
||||
curl -sSLo - https://github.com/mikefarah/yq/releases/download/v4.20.2/yq_$(OS)_$(ARCHA).tar.gz | \
|
||||
tar xzf - -C bin/ ;\
|
||||
mv bin/yq_$(OS)_$(ARCHA) bin/yq ;\
|
||||
}
|
||||
else
|
||||
YQ = $(shell which yq)
|
||||
endif
|
||||
endif
|
||||
|
||||
PHONY: cr
|
||||
CR = $(shell pwd)/bin/cr
|
||||
cr: ## Download cr locally if necessary.
|
||||
ifeq (,$(wildcard $(CR)))
|
||||
ifeq (,$(shell which cr 2>/dev/null))
|
||||
@{ \
|
||||
set -e ;\
|
||||
mkdir -p $(dir $(CR)) ;\
|
||||
curl -sSLo - https://github.com/helm/chart-releaser/releases/download/v1.3.0/chart-releaser_1.3.0_$(OS)_$(ARCHA).tar.gz | \
|
||||
tar xzf - -C bin/ cr ;\
|
||||
}
|
||||
else
|
||||
CR = $(shell which cr)
|
||||
endif
|
||||
endif
|
||||
|
||||
charts:
|
||||
mkdir -p $@
|
||||
|
||||
.PHONY: helm-chart
|
||||
helm-chart: helm-chart-generate
|
||||
|
||||
.PHONY: helm-chart-generate
|
||||
helm-chart-generate: kustomize helm kubectl-slice yq charts
|
||||
@echo "== KUSTOMIZE: Set image and chart label =="
|
||||
cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG}
|
||||
cd config/manager && $(KUSTOMIZE) edit set label helm.sh/chart:$(CHART_NAME)
|
||||
cd config/default && $(KUSTOMIZE) edit set label helm.sh/chart:$(CHART_NAME)
|
||||
|
||||
@echo "== Gather Helm Chart Metadata =="
|
||||
# remove the existing chart if it exists
|
||||
rm -rf charts/$(CHART_NAME)
|
||||
# create new chart metadata in Chart.yaml
|
||||
cd charts && \
|
||||
$(HELM) create awx-operator --starter $(shell pwd)/.helm/starter ;\
|
||||
$(YQ) -i '.version = "$(VERSION)"' $(CHART_NAME)/Chart.yaml ;\
|
||||
$(YQ) -i '.appVersion = "$(VERSION)" | .appVersion style="double"' $(CHART_NAME)/Chart.yaml ;\
|
||||
$(YQ) -i '.description = "$(CHART_DESCRIPTION)"' $(CHART_NAME)/Chart.yaml ;\
|
||||
|
||||
@echo "Generated chart metadata:"
|
||||
@cat charts/$(CHART_NAME)/Chart.yaml
|
||||
|
||||
@echo "== KUSTOMIZE: Generate resources and slice into templates =="
|
||||
# place in raw-files directory so they can be modified while they are valid yaml - as soon as they are in templates/,
|
||||
# wild cards pick up the actual templates, which are not real yaml and can't have yq run on them.
|
||||
$(KUSTOMIZE) build --load-restrictor LoadRestrictionsNone config/default | \
|
||||
$(KUBECTL_SLICE) --input-file=- \
|
||||
--output-dir=charts/$(CHART_NAME)/raw-files \
|
||||
--sort-by-kind
|
||||
|
||||
@echo "== GIT: Reset kustomize configs =="
|
||||
# reset kustomize configs following kustomize build
|
||||
git checkout -f config/.
|
||||
|
||||
@echo "== Build Templates and CRDS =="
|
||||
# Delete metadata.namespace, release namespace will be automatically inserted by helm
|
||||
for file in charts/$(CHART_NAME)/raw-files/*; do\
|
||||
$(YQ) -i 'del(.metadata.namespace)' $${file};\
|
||||
done
|
||||
# Correct namespace for rolebinding to be release namespace, this must be explicit
|
||||
for file in charts/$(CHART_NAME)/raw-files/*rolebinding*; do\
|
||||
$(YQ) -i '.subjects[0].namespace = "{{ .Release.Namespace }}"' $${file};\
|
||||
done
|
||||
# Correct .metadata.name for cluster scoped resources
|
||||
cluster_scoped_files="charts/$(CHART_NAME)/raw-files/clusterrolebinding-awx-operator-proxy-rolebinding.yaml charts/$(CHART_NAME)/raw-files/clusterrole-awx-operator-metrics-reader.yaml charts/$(CHART_NAME)/raw-files/clusterrole-awx-operator-proxy-role.yaml";\
|
||||
for file in $${cluster_scoped_files}; do\
|
||||
$(YQ) -i '.metadata.name += "-{{ .Release.Name }}"' $${file};\
|
||||
done
|
||||
|
||||
# Correct the reference for the clusterrolebinding
|
||||
$(YQ) -i '.roleRef.name += "-{{ .Release.Name }}"' 'charts/$(CHART_NAME)/raw-files/clusterrolebinding-awx-operator-proxy-rolebinding.yaml'
|
||||
# move all custom resource definitions to crds folder
|
||||
mkdir charts/$(CHART_NAME)/crds
|
||||
mv charts/$(CHART_NAME)/raw-files/customresourcedefinition*.yaml charts/$(CHART_NAME)/crds/.
|
||||
# remove any namespace definitions
|
||||
rm -f charts/$(CHART_NAME)/raw-files/namespace*.yaml
|
||||
# move remaining resources to helm templates
|
||||
mv charts/$(CHART_NAME)/raw-files/* charts/$(CHART_NAME)/templates/.
|
||||
# remove the raw-files folder
|
||||
rm -rf charts/$(CHART_NAME)/raw-files
|
||||
|
||||
# create and populate NOTES.txt
|
||||
@echo "AWX Operator installed with Helm Chart version $(VERSION)" > charts/$(CHART_NAME)/templates/NOTES.txt
|
||||
|
||||
@echo "Helm chart successfully configured for $(CHART_NAME) version $(VERSION)"
|
||||
|
||||
|
||||
.PHONY: helm-package
|
||||
helm-package: helm-chart
|
||||
@echo "== Package Current Chart Version =="
|
||||
mkdir -p .cr-release-packages
|
||||
# package the chart and put it in .cr-release-packages dir
|
||||
$(HELM) package ./charts/awx-operator -d .cr-release-packages/$(VERSION)
|
||||
|
||||
# List all tags oldest to newest.
|
||||
TAGS := $(shell git ls-remote --tags --sort=version:refname --refs -q | cut -d/ -f3)
|
||||
|
||||
# The actual release happens in ansible/helm-release.yml, which calls this targer
|
||||
# until https://github.com/helm/chart-releaser/issues/122 happens, chart-releaser is not ideal for a chart
|
||||
# that is contained within a larger repo, where a tag may not require a new chart version
|
||||
.PHONY: helm-index
|
||||
helm-index:
|
||||
# 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
|
||||
|
||||
@echo "== GENERATE INDEX FILE =="
|
||||
# This step to workaround issues with old releases being dropped.
|
||||
# Until https://github.com/helm/chart-releaser/issues/133 happens
|
||||
@echo "== CHART FETCH previous releases =="
|
||||
# Download all old releases
|
||||
mkdir -p .cr-release-packages
|
||||
|
||||
for tag in $(TAGS); do\
|
||||
dl_url="https://github.com/$(CHART_OWNER)/$(CHART_REPO)/releases/download/$${tag}/$(CHART_REPO)-$${tag}.tgz";\
|
||||
echo "Downloading $${tag} from $${dl_url}";\
|
||||
curl -RLOs -z "$(CHART_REPO)-$${tag}.tgz" --fail $${dl_url};\
|
||||
result=$$?;\
|
||||
if [ $${result} -eq 0 ]; then\
|
||||
echo "Downloaded $${dl_url}";\
|
||||
mkdir -p .cr-release-packages/$${tag};\
|
||||
mv ./$(CHART_REPO)-$${tag}.tgz .cr-release-packages/$${tag};\
|
||||
else\
|
||||
echo "Skipping release $${tag}; No helm chart present";\
|
||||
rm -rf "$(CHART_REPO)-$${tag}.tgz";\
|
||||
fi;\
|
||||
done;\
|
||||
|
||||
# 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
|
||||
# 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 $(CHART_DIR)/index.yaml
|
||||
|
||||
mv .cr-release-packages/index.yaml $(CHART_DIR)/index.yaml
|
||||
|
||||
47
README.md
@@ -3,35 +3,24 @@
|
||||
[](https://opensource.org/licenses/Apache-2.0)
|
||||
[](https://github.com/ansible/awx-operator/actions)
|
||||
[](https://docs.ansible.com/ansible/latest/community/code_of_conduct.html)
|
||||
[](https://groups.google.com/g/awx-project)
|
||||
[](https://libera.chat)
|
||||
|
||||
An [Ansible AWX](https://github.com/ansible/awx) operator for Kubernetes built with [Operator SDK](https://github.com/operator-framework/operator-sdk) and Ansible.
|
||||
|
||||
<!-- Regenerate this table of contents using https://github.com/ekalinin/github-markdown-toc -->
|
||||
<!-- gh-md-toc --insert README.md -->
|
||||
<!--ts-->
|
||||
The AWX Operator is meant to be deployed in your Kubernetes cluster(s) and can be used to install and manage the lifecycle of an AWX instance in the same namespace.
|
||||
|
||||
# AWX Operator Documentation
|
||||
## Documentation
|
||||
|
||||
The AWX Operator documentation is now available at https://awx-operator.readthedocs.io/
|
||||
The AWX Operator documentation is available at <https://ansible.readthedocs.io/projects/awx-operator/>
|
||||
|
||||
For docs changes, create PRs on the appropriate files in the /docs folder.
|
||||
> Helm chart documentation is available at <https://ansible-community.github.io/awx-operator-helm/>
|
||||
|
||||
## Contributing
|
||||
|
||||
Please visit [our contributing guidelines](https://github.com/ansible/awx-operator/blob/devel/CONTRIBUTING.md).
|
||||
|
||||
## Release Process
|
||||
For docs changes, create PRs on the appropriate files in the `/docs` folder.
|
||||
|
||||
The first step is to create a draft release. Typically this will happen in the [Stage Release](https://github.com/ansible/awx/blob/devel/.github/workflows/stage.yml) workflow for AWX and you don't need to do it as a separate step.
|
||||
|
||||
If you need to do an independent release of the operator, you can run the [Stage Release](https://github.com/ansible/awx-operator/blob/devel/.github/workflows/stage.yml) in the awx-operator repo. Both of these workflows will run smoke tests, so there is no need to do this manually.
|
||||
|
||||
After the draft release is created, publish it and the [Promote AWX Operator image](https://github.com/ansible/awx-operator/blob/devel/.github/workflows/promote.yaml) will run, which will:
|
||||
|
||||
- Publish image to Quay
|
||||
- Release Helm chart
|
||||
The development environment consists of running an [`up.sh`](https://github.com/ansible/awx-operator/blob/devel/up.sh) and a [`down.sh`](https://github.com/ansible/awx-operator/blob/devel/down.sh) script, which applies or deletes yaml on the Openshift or K8s cluster you are connected to. See the [development.md](https://github.com/ansible/awx-operator/blob/devel/docs/development.md) for information on how to deploy and test changes from your branch.
|
||||
|
||||
## Author
|
||||
|
||||
@@ -43,7 +32,25 @@ We ask all of our community members and contributors to adhere to the [Ansible c
|
||||
|
||||
## Get Involved
|
||||
|
||||
We welcome your feedback and ideas. The AWX operator uses the same mailing list and IRC channel as AWX itself. Here's how to reach us with feedback and questions:
|
||||
We welcome your feedback, questions and ideas. Here's how to reach the community.
|
||||
|
||||
- Join the [Ansible AWX channel on Matrix](https://matrix.to/#/#awx:ansible.com)
|
||||
- Join the [Ansible Community Forum](https://forum.ansible.com)
|
||||
### Forum
|
||||
|
||||
Join the [Ansible Forum](https://forum.ansible.com) as a single starting point and our default communication platform for questions and help, development discussions, events, and much more. [Register](https://forum.ansible.com/signup?) to join the community. Search by categories and tags to find interesting topics or start a new one; subscribe only to topics you need!
|
||||
|
||||
* [Get Help](https://forum.ansible.com/c/help/6): get help or help others. Please add appropriate tags if you start new discussions, for example `awx-operator` and `documentation`.
|
||||
* [Posts tagged with 'awx-operator'](https://forum.ansible.com/tag/awx-operator): subscribe to participate in project-related conversations.
|
||||
* [Bullhorn newsletter](https://docs.ansible.com/ansible/devel/community/communication.html#the-bullhorn) used to announce releases and important changes.
|
||||
* [Social Spaces](https://forum.ansible.com/c/chat/4): gather and interact with fellow enthusiasts.
|
||||
* [News & Announcements](https://forum.ansible.com/c/news/5): track project-wide announcements including social events.
|
||||
|
||||
For more information on the forum navigation, see [Navigating the Ansible forum](https://forum.ansible.com/t/navigating-the-ansible-forum-tags-categories-and-concepts/39) post.
|
||||
|
||||
### Matrix
|
||||
|
||||
For real-time interactions, conversations in the community happen over the Matrix protocol in the following channels:
|
||||
|
||||
* [#awx:ansible.com](https://matrix.to/#/#awx:ansible.com): AWX and AWX-Operator project-related discussions.
|
||||
* [#docs:ansible.im](https://matrix.to/#/#docs:ansible.im): Ansible, AWX and AWX-Operator documentation-related discussions.
|
||||
|
||||
For more information, see the community-hosted [Matrix FAQ](https://hackmd.io/@ansible-community/community-matrix-faq).
|
||||
|
||||
@@ -1,122 +0,0 @@
|
||||
---
|
||||
- hosts: localhost
|
||||
vars:
|
||||
chart_repo: awx-operator
|
||||
environment:
|
||||
CHART_OWNER: "{{ chart_owner }}"
|
||||
tasks:
|
||||
- name: Look up release
|
||||
uri:
|
||||
url: "https://api.github.com/repos/{{ chart_owner }}/{{ chart_repo }}/releases/tags/{{ tag }}"
|
||||
register: release
|
||||
ignore_errors: yes
|
||||
|
||||
- fail:
|
||||
msg: |
|
||||
Release must exist before running this playbook
|
||||
when: release is not success
|
||||
|
||||
- name: Set helm filename and commit message
|
||||
set_fact:
|
||||
asset_already_attached: False
|
||||
helm_file_name: "awx-operator-{{ tag }}.tgz"
|
||||
commit_message: "Updated index.yaml for release {{ release.json.tag_name }}"
|
||||
|
||||
- name: See if file is already attached
|
||||
set_fact:
|
||||
asset_already_attached: True
|
||||
loop: "{{ release.json.get('assets', []) }}"
|
||||
loop_control:
|
||||
label: "{{ item.name }}"
|
||||
when: item.name == helm_file_name
|
||||
|
||||
- when: not asset_already_attached
|
||||
block:
|
||||
- name: Build and package helm chart
|
||||
command: |
|
||||
make helm-package
|
||||
environment:
|
||||
VERSION: "{{ tag }}"
|
||||
IMAGE_TAG_BASE: "{{ operator_image }}"
|
||||
args:
|
||||
chdir: "{{ playbook_dir }}/../"
|
||||
|
||||
# Move to chart releaser after https://github.com/helm/chart-releaser/issues/122 exists
|
||||
- name: Upload helm chart
|
||||
uri:
|
||||
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/{{ tag }}/awx-operator-{{ tag }}.tgz"
|
||||
headers:
|
||||
Authorization: "token {{ gh_token }}"
|
||||
Content-Type: "application/octet-stream"
|
||||
status_code:
|
||||
- 200
|
||||
- 201
|
||||
register: asset_upload
|
||||
changed_when: asset_upload.json.state == "uploaded"
|
||||
|
||||
- name: Ensure gh-pages exists
|
||||
file:
|
||||
state: directory
|
||||
path: "{{ playbook_dir }}/../gh-pages"
|
||||
|
||||
- name: Check if we have published the release
|
||||
command:
|
||||
cmd: "git log --grep='{{ commit_message }}'"
|
||||
chdir: "{{ playbook_dir }}/../gh-pages"
|
||||
register: commits_for_release
|
||||
|
||||
- when: commits_for_release.stdout == ''
|
||||
block:
|
||||
- name: Make a temp dir
|
||||
tempfile:
|
||||
state: directory
|
||||
register: temp_dir
|
||||
|
||||
- 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
|
||||
ansible.builtin.command:
|
||||
cmd: make helm-index
|
||||
environment:
|
||||
CHART_OWNER: "{{ chart_owner }}"
|
||||
CR_TOKEN: "{{ gh_token }}"
|
||||
CHART_DIR: "{{ temp_dir.path }}"
|
||||
args:
|
||||
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
|
||||
command:
|
||||
cmd: "{{ item }}"
|
||||
loop:
|
||||
- git add index.yaml
|
||||
- git commit -m "{{ commit_message }}"
|
||||
- git push
|
||||
args:
|
||||
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
|
||||
@@ -75,6 +75,381 @@ spec:
|
||||
ingress_controller:
|
||||
description: Special configuration for specific Ingress Controllers
|
||||
type: string
|
||||
node_selector:
|
||||
description: Assign the Mesh Ingress Pod to the specified node.
|
||||
type: string
|
||||
tolerations:
|
||||
description: Scheduling tolerations for the Mesh Ingress instance.
|
||||
type: string
|
||||
topology_spread_constraints:
|
||||
description: Topology spread constraints for the Mesh Ingress instance.
|
||||
type: string
|
||||
affinity:
|
||||
description: Scheduling constraints to apply to the Pod definition
|
||||
properties:
|
||||
nodeAffinity:
|
||||
properties:
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
items:
|
||||
properties:
|
||||
preference:
|
||||
properties:
|
||||
matchExpressions:
|
||||
items:
|
||||
properties:
|
||||
key:
|
||||
type: string
|
||||
operator:
|
||||
type: string
|
||||
values:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
matchFields:
|
||||
items:
|
||||
properties:
|
||||
key:
|
||||
type: string
|
||||
operator:
|
||||
type: string
|
||||
values:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
weight:
|
||||
format: int32
|
||||
type: integer
|
||||
required:
|
||||
- preference
|
||||
- weight
|
||||
type: object
|
||||
type: array
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
properties:
|
||||
nodeSelectorTerms:
|
||||
items:
|
||||
properties:
|
||||
matchExpressions:
|
||||
items:
|
||||
properties:
|
||||
key:
|
||||
type: string
|
||||
operator:
|
||||
type: string
|
||||
values:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
matchFields:
|
||||
items:
|
||||
properties:
|
||||
key:
|
||||
type: string
|
||||
operator:
|
||||
type: string
|
||||
values:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
type: array
|
||||
required:
|
||||
- nodeSelectorTerms
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
type: object
|
||||
podAffinity:
|
||||
properties:
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
items:
|
||||
properties:
|
||||
podAffinityTerm:
|
||||
properties:
|
||||
labelSelector:
|
||||
properties:
|
||||
matchExpressions:
|
||||
items:
|
||||
properties:
|
||||
key:
|
||||
type: string
|
||||
operator:
|
||||
type: string
|
||||
values:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
namespaceSelector:
|
||||
properties:
|
||||
matchExpressions:
|
||||
items:
|
||||
properties:
|
||||
key:
|
||||
type: string
|
||||
operator:
|
||||
type: string
|
||||
values:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
namespaces:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
topologyKey:
|
||||
type: string
|
||||
required:
|
||||
- topologyKey
|
||||
type: object
|
||||
weight:
|
||||
format: int32
|
||||
type: integer
|
||||
required:
|
||||
- podAffinityTerm
|
||||
- weight
|
||||
type: object
|
||||
type: array
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
items:
|
||||
properties:
|
||||
labelSelector:
|
||||
properties:
|
||||
matchExpressions:
|
||||
items:
|
||||
properties:
|
||||
key:
|
||||
type: string
|
||||
operator:
|
||||
type: string
|
||||
values:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
namespaceSelector:
|
||||
properties:
|
||||
matchExpressions:
|
||||
items:
|
||||
properties:
|
||||
key:
|
||||
type: string
|
||||
operator:
|
||||
type: string
|
||||
values:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
namespaces:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
topologyKey:
|
||||
type: string
|
||||
required:
|
||||
- topologyKey
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
podAntiAffinity:
|
||||
properties:
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
items:
|
||||
properties:
|
||||
podAffinityTerm:
|
||||
properties:
|
||||
labelSelector:
|
||||
properties:
|
||||
matchExpressions:
|
||||
items:
|
||||
properties:
|
||||
key:
|
||||
type: string
|
||||
operator:
|
||||
type: string
|
||||
values:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
namespaceSelector:
|
||||
properties:
|
||||
matchExpressions:
|
||||
items:
|
||||
properties:
|
||||
key:
|
||||
type: string
|
||||
operator:
|
||||
type: string
|
||||
values:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
namespaces:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
topologyKey:
|
||||
type: string
|
||||
required:
|
||||
- topologyKey
|
||||
type: object
|
||||
weight:
|
||||
format: int32
|
||||
type: integer
|
||||
required:
|
||||
- podAffinityTerm
|
||||
- weight
|
||||
type: object
|
||||
type: array
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
items:
|
||||
properties:
|
||||
labelSelector:
|
||||
properties:
|
||||
matchExpressions:
|
||||
items:
|
||||
properties:
|
||||
key:
|
||||
type: string
|
||||
operator:
|
||||
type: string
|
||||
values:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
namespaceSelector:
|
||||
properties:
|
||||
matchExpressions:
|
||||
items:
|
||||
properties:
|
||||
key:
|
||||
type: string
|
||||
operator:
|
||||
type: string
|
||||
values:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
namespaces:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
topologyKey:
|
||||
type: string
|
||||
required:
|
||||
- topologyKey
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
type: object
|
||||
status:
|
||||
description: Status defines the observed state of AWXMeshIngress
|
||||
type: object
|
||||
|
||||
@@ -94,6 +94,11 @@ spec:
|
||||
postgres_image_version:
|
||||
description: PostgreSQL container image version to use
|
||||
type: string
|
||||
spec_overrides:
|
||||
description: Overrides for the AWX spec
|
||||
# type: string
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
image_pull_policy:
|
||||
description: The image pull policy
|
||||
type: string
|
||||
|
||||
@@ -73,6 +73,9 @@ spec:
|
||||
type: string
|
||||
maxLength: 255
|
||||
pattern: '^[a-zA-Z0-9][-a-zA-Z0-9]{0,253}[a-zA-Z0-9]$'
|
||||
pg_dump_suffix:
|
||||
description: Additional parameters for the pg_dump command during a migration
|
||||
type: string
|
||||
postgres_label_selector:
|
||||
description: Label selector used to identify postgres pod for data migration
|
||||
type: string
|
||||
@@ -144,6 +147,9 @@ spec:
|
||||
ingress_controller:
|
||||
description: Special configuration for specific Ingress Controllers
|
||||
type: string
|
||||
api_urlpattern_prefix:
|
||||
description: An optional configuration to add a prefix in the API URL path
|
||||
type: string
|
||||
loadbalancer_protocol:
|
||||
description: Protocol to use for the loadbalancer
|
||||
type: string
|
||||
@@ -218,6 +224,9 @@ spec:
|
||||
web_annotations:
|
||||
description: Web deployment annotations. This will override the general annotations parameter for the Web deployment.
|
||||
type: string
|
||||
postgres_annotations:
|
||||
description: Annotations to add to the Postgres deployment.
|
||||
type: string
|
||||
tolerations:
|
||||
description: node tolerations for the pods
|
||||
type: string
|
||||
@@ -1460,7 +1469,7 @@ spec:
|
||||
type: object
|
||||
type: object
|
||||
postgres_init_container_resource_requirements:
|
||||
description: Resource requirements for the postgres init container
|
||||
description: (Deprecated, use postgres_resource_requirements parameter) Resource requirements for the postgres init container
|
||||
properties:
|
||||
requests:
|
||||
properties:
|
||||
@@ -1571,10 +1580,18 @@ spec:
|
||||
description: Number of web instance replicas
|
||||
type: integer
|
||||
format: int32
|
||||
web_manage_replicas:
|
||||
description: Enables operator control of replicas count for the web deployment when set to 'true'
|
||||
type: boolean
|
||||
default: true
|
||||
task_replicas:
|
||||
description: Number of task instance replicas
|
||||
type: integer
|
||||
format: int32
|
||||
task_manage_replicas:
|
||||
description: Enables operator control of replicas count for the task deployment when set to 'true'
|
||||
type: boolean
|
||||
default: true
|
||||
web_liveness_initial_delay:
|
||||
description: Initial delay before starting liveness checks on web pod
|
||||
type: integer
|
||||
@@ -1713,6 +1730,9 @@ spec:
|
||||
uwsgi_listen_queue_size:
|
||||
description: Set the socket listen queue size for uwsgi
|
||||
type: integer
|
||||
uwsgi_timeout:
|
||||
description: Set the timeout for requests served by uwsgi. (note, graceful exit signal sent 2 seconds prior to timeout)
|
||||
type: integer
|
||||
nginx_worker_processes:
|
||||
description: Set the number of workers for nginx
|
||||
type: integer
|
||||
@@ -1807,13 +1827,16 @@ spec:
|
||||
postgres_priority_class:
|
||||
description: Assign a preexisting priority class to the postgres pod
|
||||
type: string
|
||||
postgres_data_path:
|
||||
description: Path where the PostgreSQL data are located
|
||||
type: string
|
||||
postgres_extra_args:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
postgres_data_volume_init:
|
||||
description: Sets permissions on the /var/lib/pgdata/data for postgres container using an init container (not Openshift)
|
||||
type: boolean
|
||||
postgres_init_container_commands:
|
||||
description: Customize the postgres init container commands (Non Openshift)
|
||||
type: string
|
||||
postgres_extra_volumes:
|
||||
description: Specify extra volumes to add to the application pod
|
||||
type: string
|
||||
@@ -1842,11 +1865,11 @@ spec:
|
||||
development_mode:
|
||||
description: If the deployment should be done in development mode
|
||||
type: boolean
|
||||
ldap_cacert_secret:
|
||||
description: Secret where can be found the LDAP trusted Certificate Authority Bundle
|
||||
ldap_cacert_secret: # deprecated
|
||||
description: (Deprecated) Secret where can be found the LDAP trusted Certificate Authority Bundle
|
||||
type: string
|
||||
ldap_password_secret:
|
||||
description: Secret where can be found the LDAP bind password
|
||||
ldap_password_secret: # deprecated
|
||||
description: (Deprecated) Secret where can be found the LDAP bind password
|
||||
type: string
|
||||
bundle_cacert_secret:
|
||||
description: Secret where can be found the trusted Certificate Authority Bundle
|
||||
@@ -1898,6 +1921,28 @@ spec:
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
type: object
|
||||
type: array
|
||||
extra_settings_files:
|
||||
description: Extra ConfigMaps or Secrets of settings files to specify for AWX
|
||||
properties:
|
||||
configmaps:
|
||||
items:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
key:
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
secrets:
|
||||
items:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
key:
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
no_log:
|
||||
description: Configure no_log for no_log tasks
|
||||
type: boolean
|
||||
@@ -1923,6 +1968,9 @@ spec:
|
||||
description: Disable web container's nginx ipv6 listener
|
||||
type: boolean
|
||||
default: false
|
||||
idle_deployment:
|
||||
description: Scale down deployments to put AWX into an idle state
|
||||
type: boolean
|
||||
metrics_utility_enabled:
|
||||
description: Enable metrics utility
|
||||
type: boolean
|
||||
@@ -1937,28 +1985,42 @@ spec:
|
||||
description: Metrics-Utility Image PullPolicy
|
||||
type: string
|
||||
metrics_utility_configmap:
|
||||
description: Metrics-Utlity ConfigMap
|
||||
description: Metrics-Utility ConfigMap
|
||||
type: string
|
||||
metrics_utility_secret:
|
||||
description: Metrics-Utility Secret
|
||||
type: string
|
||||
metrics_utility_cronjob_gather_schedule:
|
||||
description: Metrics-Utlity Gather Data CronJob Schedule
|
||||
description: Metrics-Utility Gather Data CronJob Schedule
|
||||
type: string
|
||||
default: '@hourly'
|
||||
metrics_utility_cronjob_report_schedule:
|
||||
description: Metrics-Utlity Report CronJob Schedule
|
||||
description: Metrics-Utility Report CronJob Schedule
|
||||
type: string
|
||||
default: '@monthly'
|
||||
metrics_utility_ship_target:
|
||||
description: Metrics-Utility Ship Target
|
||||
type: string
|
||||
metrics_utility_pvc_claim:
|
||||
description: Metrics-Utlity PVC Claim
|
||||
description: Metrics-Utility PVC Claim
|
||||
type: string
|
||||
metrics_utility_pvc_claim_size:
|
||||
description: Metrics-Utlity PVC Claim Size
|
||||
description: Metrics-Utility PVC Claim Size
|
||||
type: string
|
||||
default: 5Gi
|
||||
metrics_utility_pvc_claim_storage_class:
|
||||
description: Metrics-Utlity PVC Claim Storage Class
|
||||
description: Metrics-Utility PVC Claim Storage Class
|
||||
type: string
|
||||
metrics_utility_console_enabled:
|
||||
description: Enable metrics utility shipping to Red Hat Hybrid Cloud Console
|
||||
type: boolean
|
||||
default: false
|
||||
public_base_url:
|
||||
description: Public base URL
|
||||
type: string
|
||||
type: object
|
||||
status:
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
properties:
|
||||
URL:
|
||||
description: URL to access the deployed instance
|
||||
@@ -1990,6 +2052,9 @@ spec:
|
||||
image:
|
||||
description: URL of the image used for the deployed instance
|
||||
type: string
|
||||
upgradedFrom:
|
||||
description: Last gated version
|
||||
type: string
|
||||
conditions:
|
||||
description: The resulting conditions when a Service Telemetry is instantiated
|
||||
items:
|
||||
@@ -2004,5 +2069,6 @@ spec:
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
type: object
|
||||
type: object
|
||||
|
||||
@@ -73,8 +73,8 @@ spec:
|
||||
memory: "32Mi"
|
||||
cpu: "50m"
|
||||
limits:
|
||||
memory: "960Mi"
|
||||
cpu: "1500m"
|
||||
memory: "4000Mi"
|
||||
cpu: "2000m"
|
||||
serviceAccountName: controller-manager
|
||||
imagePullSecrets:
|
||||
- name: redhat-operators-pull-secret
|
||||
|
||||
@@ -58,6 +58,31 @@ spec:
|
||||
path: ingress_controller
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- displayName: Node Selector
|
||||
path: node_selector
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- 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: Topology Spread Constraints
|
||||
path: topology_spread_constraints
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: Affinity
|
||||
path: affinity
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: Optional API URLPATTERN Prefix
|
||||
path: api_urlpattern_prefix
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- displayName: Image Pull Secrets
|
||||
path: image_pull_secrets
|
||||
x-descriptors:
|
||||
@@ -148,6 +173,12 @@ spec:
|
||||
path: db_management_pod_node_selector
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- displayName: Public Base URL
|
||||
path: public_base_url
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
statusDescriptors:
|
||||
- description: Persistent volume claim name used during backup
|
||||
displayName: Backup Claim
|
||||
@@ -213,6 +244,10 @@ spec:
|
||||
path: postgres_image_version
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: AWX Spec Overrides
|
||||
path: spec_overrides
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- displayName: Image Pull Policy
|
||||
path: image_pull_policy
|
||||
x-descriptors:
|
||||
@@ -290,6 +325,11 @@ spec:
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:io.kubernetes:Secret
|
||||
- description: PostgreSQL dump additional parameters to exclude tables during migration to openshift
|
||||
displayname: PostgreSQL Extra Arguments for Migration to Openshift
|
||||
path: pg_dump_suffix
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- description: Name of the k8s secret the symmetric encryption key is stored
|
||||
in.
|
||||
displayName: Secret Key
|
||||
@@ -456,12 +496,21 @@ spec:
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:resourceRequirements
|
||||
- description: The PostgreSQL init container is not used when an external DB
|
||||
is configured
|
||||
- description: Sets permissions on the /var/lib/pgsql/data for postgres container using an init container (not Openshift)
|
||||
displayName: PostgreSQL initialize data volume
|
||||
path: postgres_data_volume_init
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- description: Customize the postgres init container commands (Non Openshift)
|
||||
displayName: PostgreSQL Init Container Commands
|
||||
path: postgres_init_container_commands
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- description: (Deprecated, use postgres_resource_requirements parameter instead)
|
||||
displayName: PostgreSQL Init Container Resource Requirements
|
||||
path: postgres_init_container_resource_requirements
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- urn:alm:descriptor:com.tectonic.ui:resourceRequirements
|
||||
- displayName: Redis Container Resource Requirements
|
||||
path: redis_resource_requirements
|
||||
@@ -505,6 +554,12 @@ spec:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:number
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: Uwsgi Timeout
|
||||
path: uwsgi_timeout
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:number
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: Uwsgi Processes
|
||||
path: uwsgi_processes
|
||||
x-descriptors:
|
||||
@@ -637,11 +692,6 @@ spec:
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:io.kubernetes:StorageClass
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- displayName: Postgres Datapath
|
||||
path: postgres_data_path
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: Postgres Extra Arguments
|
||||
path: postgres_extra_args
|
||||
x-descriptors:
|
||||
@@ -684,12 +734,12 @@ spec:
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: LDAP Certificate Authority Trust Bundle
|
||||
- displayName: LDAP Certificate Authority Trust Bundle (Deprecated)
|
||||
path: ldap_cacert_secret
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:io.kubernetes:Secret
|
||||
- displayName: LDAP Password Secret
|
||||
- displayName: LDAP Password Secret (Deprecated)
|
||||
path: ldap_password_secret
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
@@ -918,6 +968,11 @@ spec:
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: Postgres Annotations
|
||||
path: postgres_annotations
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: Tolerations
|
||||
path: tolerations
|
||||
x-descriptors:
|
||||
@@ -953,6 +1008,11 @@ spec:
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: Extra Settings Files
|
||||
path: extra_settings_files
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: No Log Configuration
|
||||
path: no_log
|
||||
x-descriptors:
|
||||
@@ -1034,7 +1094,8 @@ spec:
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- displayName: Metrics-Utlity Image Version
|
||||
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:metrics_utility_enabled:true
|
||||
- displayName: Metrics-Utility Image Version
|
||||
path: metrics_utility_image_version
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
@@ -1046,42 +1107,67 @@ spec:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:imagePullPolicy
|
||||
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:metrics_utility_enabled:true
|
||||
- displayName: Metrics-Utlity ConfigMap
|
||||
- displayName: Metrics-Utility ConfigMap
|
||||
path: metrics_utility_configmap
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:io.kubernetes:ConfigMap
|
||||
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:metrics_utility_enabled:true
|
||||
- displayName: Metrics-Utlity Gather Data CronJob Schedule
|
||||
- displayName: Metrics-Utility Secret
|
||||
path: metrics_utility_secret
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:io.kubernetes:Secret
|
||||
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:metrics_utility_enabled:true
|
||||
- displayName: Metrics-Utility Gather Data CronJob Schedule
|
||||
path: metrics_utility_cronjob_gather_schedule
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:metrics_utility_enabled:true
|
||||
- displayName: Metrics-Utlity Report CronJob Schedule
|
||||
- displayName: Metrics-Utility Report CronJob Schedule
|
||||
path: metrics_utility_cronjob_report_schedule
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:metrics_utility_enabled:true
|
||||
- displayName: Metrics-Utlity PVC Claim
|
||||
- displayName: Metrics-Utility Ship Target
|
||||
path: metrics_utility_ship_target
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:metrics_utility_enabled:true
|
||||
- displayName: Metrics-Utility PVC Claim
|
||||
path: metrics_utility_pvc_claim
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:metrics_utility_enabled:true
|
||||
- displayName: Metrics-Utlity PVC Claim Size
|
||||
- displayName: Metrics-Utility PVC Claim Size
|
||||
path: metrics_utility_pvc_claim_size
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:metrics_utility_enabled:true
|
||||
- displayName: Metrics-Utlity PVC Claim Storage Class
|
||||
- displayName: Metrics-Utility PVC Claim Storage Class
|
||||
path: metrics_utility_pvc_claim_storage_class
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:io.kubernetes:StorageClass
|
||||
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:metrics_utility_enabled:true
|
||||
- displayName: Metrics-Utility Enabled Shipping to Red Hat Hybrid Cloud Console
|
||||
path: metrics_utility_console_enabled
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:booleanSwitch
|
||||
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:metrics_utility_enabled:true
|
||||
- description: Scale down deployments to put AWX into an idle state
|
||||
displayName: Idle AWX
|
||||
path: idle_deployment
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:booleanSwitch
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
statusDescriptors:
|
||||
- description: Route to access the instance deployed
|
||||
displayName: URL
|
||||
|
||||
@@ -46,10 +46,3 @@ spec:
|
||||
limits:
|
||||
cpu: 1000m
|
||||
memory: 2Gi
|
||||
postgres_init_container_resource_requirements:
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 64Mi
|
||||
limits:
|
||||
cpu: 1000m
|
||||
memory: 2Gi
|
||||
|
||||
24
dev/awx-cr/awx-cr-settings.yml
Normal file
@@ -0,0 +1,24 @@
|
||||
---
|
||||
apiVersion: awx.ansible.com/v1beta1
|
||||
kind: AWX
|
||||
metadata:
|
||||
name: awx
|
||||
spec:
|
||||
service_type: clusterip
|
||||
ingress_type: route
|
||||
no_log: false
|
||||
|
||||
# Secrets
|
||||
admin_password_secret: custom-admin-password
|
||||
postgres_configuration_secret: custom-pg-configuration
|
||||
secret_key_secret: custom-secret-key
|
||||
|
||||
# Resource Requirements
|
||||
postgres_storage_requirements:
|
||||
requests:
|
||||
storage: 10Gi
|
||||
|
||||
# Extra Settings
|
||||
extra_settings:
|
||||
- setting: MAX_PAGE_SIZE
|
||||
value: "500"
|
||||
13
dev/awx-cr/awx-k8s-ingress.yml
Normal file
@@ -0,0 +1,13 @@
|
||||
---
|
||||
apiVersion: awx.ansible.com/v1beta1
|
||||
kind: AWX
|
||||
metadata:
|
||||
name: awx
|
||||
spec:
|
||||
service_type: nodeport
|
||||
ingress_type: ingress
|
||||
|
||||
# Secrets
|
||||
admin_password_secret: custom-admin-password
|
||||
postgres_configuration_secret: custom-pg-configuration
|
||||
secret_key_secret: custom-secret-key
|
||||
13
dev/awx-cr/awx-openshift-cr.yml
Normal file
@@ -0,0 +1,13 @@
|
||||
---
|
||||
apiVersion: awx.ansible.com/v1beta1
|
||||
kind: AWX
|
||||
metadata:
|
||||
name: awx
|
||||
spec:
|
||||
service_type: clusterip
|
||||
ingress_type: Route
|
||||
|
||||
# Secrets
|
||||
admin_password_secret: custom-admin-password
|
||||
postgres_configuration_secret: custom-pg-configuration
|
||||
secret_key_secret: custom-secret-key
|
||||
7
dev/secrets/admin-password-secret.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: custom-admin-password
|
||||
stringData:
|
||||
password: 'password'
|
||||
7
dev/secrets/custom-secret-key.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: custom-secret-key
|
||||
stringData:
|
||||
secret_key: 'awxsecret'
|
||||
12
dev/secrets/external-pg-secret.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: external-pg-secret
|
||||
stringData:
|
||||
database: 'awx'
|
||||
host: 'awx-postgres'
|
||||
password: 'test'
|
||||
port: '5432'
|
||||
type: 'managed'
|
||||
username: 'awx'
|
||||
@@ -2,9 +2,15 @@
|
||||
|
||||
To build the AWX Operator docs locally:
|
||||
|
||||
1. Clone the AWX operator repository.
|
||||
2. From the root directory:
|
||||
a. pip install --user -r docs/requirements.txt
|
||||
b. mkdocs build
|
||||
1. Clone the AWX operator repository.
|
||||
1. Preferrably, create a virtual environment for installing the dependencies.
|
||||
a. `python3 -m venv venv`
|
||||
b. `source venv/bin/activate`
|
||||
1. From the root directory:
|
||||
a. `pip install -r docs/requirements.txt`
|
||||
b. `mkdocs build`
|
||||
1. View the docs in your browser:
|
||||
a. `mkdocs serve`
|
||||
b. Open your browser and navigate to `http://127.0.0.1:8000/`
|
||||
|
||||
This will create a new directory called `site/` in the root of your clone containing the index.html and static files. To view the docs in your browser, navigate there in your file explorer and double-click on the `index.html` file. This should open the docs site in your browser.
|
||||
This will create a new directory called `site/` in the root of your clone containing the index.html and static files.
|
||||
|
||||
|
Before Width: | Height: | Size: 825 KiB |
@@ -1,3 +1,3 @@
|
||||
## Author
|
||||
# Author
|
||||
|
||||
This operator was originally built in 2019 by [Jeff Geerling](https://www.jeffgeerling.com) and is now maintained by the Ansible Team
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
## Code of Conduct
|
||||
# Code of Conduct
|
||||
|
||||
We ask all of our community members and contributors to adhere to the [Ansible code of conduct](http://docs.ansible.com/ansible/latest/community/code_of_conduct.html). If you have questions or need assistance, please reach out to our community team at [codeofconduct@ansible.com](mailto:codeofconduct@ansible.com)
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
## Contributing
|
||||
# Contributing
|
||||
|
||||
Please visit [our contributing guidelines](https://github.com/ansible/awx-operator/blob/devel/CONTRIBUTING.md).
|
||||
|
||||
For docs changes, create PRs on the appropriate files in the `/docs` folder.
|
||||
|
||||
@@ -1,6 +1,24 @@
|
||||
## Get Involved
|
||||
# Get Involved
|
||||
|
||||
We welcome your feedback and ideas. The AWX operator uses the same mailing list and IRC channel as AWX itself. Here's how to reach us with feedback and questions:
|
||||
We welcome your feedback, questions and ideas. Here's how to reach the community.
|
||||
|
||||
- Join the `#ansible-awx` channel on irc.libera.chat
|
||||
- Join the [mailing list](https://groups.google.com/forum/#!forum/awx-project)
|
||||
## Forum
|
||||
|
||||
Join the [Ansible Forum](https://forum.ansible.com) as a single starting point and our default communication platform for questions and help, development discussions, events, and much more. [Register](https://forum.ansible.com/signup?) to join the community. Search by categories and tags to find interesting topics or start a new one; subscribe only to topics you need!
|
||||
|
||||
* [Get Help](https://forum.ansible.com/c/help/6): get help or help others. Please add appropriate tags if you start new discussions, for example `awx-operator` and `documentation`.
|
||||
* [Posts tagged with 'awx-operator'](https://forum.ansible.com/tag/awx-operator): subscribe to participate in project-related conversations.
|
||||
* [Bullhorn newsletter](https://docs.ansible.com/ansible/devel/community/communication.html#the-bullhorn) used to announce releases and important changes.
|
||||
* [Social Spaces](https://forum.ansible.com/c/chat/4): gather and interact with fellow enthusiasts.
|
||||
* [News & Announcements](https://forum.ansible.com/c/news/5): track project-wide announcements including social events.
|
||||
|
||||
For more information on the forum navigation, see [Navigating the Ansible forum](https://forum.ansible.com/t/navigating-the-ansible-forum-tags-categories-and-concepts/39) post.
|
||||
|
||||
## Matrix
|
||||
|
||||
For real-time interactions, conversations in the community happen over the Matrix protocol in the following channels:
|
||||
|
||||
* [#awx:ansible.com](https://matrix.to/#/#awx:ansible.com): AWX and AWX-Operator project-related discussions.
|
||||
* [#docs:ansible.im](https://matrix.to/#/#docs:ansible.im): Ansible, AWX and AWX-Operator documentation-related discussions.
|
||||
|
||||
For more information, see the community-hosted [Matrix FAQ](https://hackmd.io/@ansible-community/community-matrix-faq).
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
## Release Process
|
||||
# Release Process
|
||||
|
||||
The first step is to create a draft release. Typically this will happen in the [Stage Release](https://github.com/ansible/awx/blob/devel/.github/workflows/stage.yml) workflow for AWX and you don't need to do it as a separate step.
|
||||
|
||||
@@ -10,16 +10,18 @@ After the draft release is created, publish it and the [Promote AWX Operator ima
|
||||
- Release Helm chart
|
||||
|
||||
After the GHA is complete, the final step is to run the [publish-to-operator-hub.sh](https://github.com/ansible/awx-operator/blob/devel/hack/publish-to-operator-hub.sh) script, which will create a PR in the following repos to add the new awx-operator bundle version to OperatorHub:
|
||||
* https://github.com/k8s-operatorhub/community-operators (community operator index)
|
||||
* https://github.com/redhat-openshift-ecosystem/community-operators-prod (operator index shipped with Openshift)
|
||||
|
||||
The usage is documented in the script itself, but here is an example of how you would use the script to publish the 2.5.3 awx-opeator bundle to OperatorHub.
|
||||
Note that you need to specify the version being released, as well as the previous version. This is because the bundle has a pointer to the previous version that is it being upgrade from. This is used by OLM to create a dependency graph.
|
||||
- <https://github.com/k8s-operatorhub/community-operators> (community operator index)
|
||||
- <https://github.com/redhat-openshift-ecosystem/community-operators-prod> (operator index shipped with Openshift)
|
||||
|
||||
```bash
|
||||
$ VERSION=2.5.3 PREV_VERSION=2.5.2 ./publish-operator.sh
|
||||
```
|
||||
!!! note
|
||||
The usage is documented in the script itself, but here is an example of how you would use the script to publish the 2.5.3 awx-opeator bundle to OperatorHub.
|
||||
Note that you need to specify the version being released, as well as the previous version. This is because the bundle has a pointer to the previous version that is it being upgrade from. This is used by OLM to create a dependency graph.
|
||||
|
||||
> Note: There are some quirks with running this on OS X that still need to be fixed, but the script runs smoothly on linux.
|
||||
```bash
|
||||
VERSION=2.5.3 PREV_VERSION=2.5.2 ./hack/publish-to-operator-hub.sh
|
||||
```
|
||||
|
||||
There are some quirks with running this on OS X that still need to be fixed, but the script runs smoothly on linux.
|
||||
|
||||
As soon as CI completes successfully, the PR's will be auto-merged. Please remember to monitor those PR's to make sure that CI passes, sometimes it needs a retry.
|
||||
|
||||
58
docs/development.md
Normal file
@@ -0,0 +1,58 @@
|
||||
# Development Guide
|
||||
|
||||
There are development scripts and yaml exaples in the [`dev/`](../dev) directory that, along with the up.sh and down.sh scripts in the root of the repo, can be used to build, deploy and test changes made to the awx-operator.
|
||||
|
||||
|
||||
## Build and Deploy
|
||||
|
||||
|
||||
If you clone the repo, and make sure you are logged in at the CLI with oc and your cluster, you can run:
|
||||
|
||||
```
|
||||
export QUAY_USER=username
|
||||
export NAMESPACE=awx
|
||||
export TAG=test
|
||||
./up.sh
|
||||
```
|
||||
|
||||
You can add those variables to your .bashrc file so that you can just run `./up.sh` in the future.
|
||||
|
||||
> Note: the first time you run this, it will create quay.io repos on your fork. You will need to either make those public, or create a global pull secret on your Openshift cluster.
|
||||
|
||||
To get the URL, if on **Openshift**, run:
|
||||
|
||||
```
|
||||
$ oc get route
|
||||
```
|
||||
|
||||
On **k8s with ingress**, run:
|
||||
|
||||
```
|
||||
$ kubectl get ing
|
||||
```
|
||||
|
||||
On **k8s with nodeport**, run:
|
||||
|
||||
```
|
||||
$ kubectl get svc
|
||||
```
|
||||
|
||||
The URL is then `http://<Node-IP>:<NodePort>`
|
||||
|
||||
> Note: NodePort will only work if you expose that port on your underlying k8s node, or are accessing it from localhost.
|
||||
|
||||
By default, the usename and password will be admin and password if using the `up.sh` script because it pre-creates a custom admin password k8s secret and specifies it on the AWX custom resource spec. Without that, a password would have been generated and stored in a k8s secret named <deployment-name>-admin-password.
|
||||
|
||||
## Clean up
|
||||
|
||||
|
||||
Same thing for cleanup, just run ./down.sh and it will clean up your namespace on that cluster
|
||||
|
||||
|
||||
```
|
||||
./down.sh
|
||||
```
|
||||
|
||||
## Running CI tests locally
|
||||
|
||||
More tests coming soon...
|
||||
@@ -1,2 +0,0 @@
|
||||
|
||||
The AWX operator is meant to provide a more Kubernetes-native installation method for AWX via an AWX Custom Resource Definition (CRD).
|
||||
1
docs/index.md
Symbolic link
@@ -0,0 +1 @@
|
||||
../README.md
|
||||
@@ -1,6 +1,7 @@
|
||||
### Basic Install
|
||||
# Basic Install
|
||||
|
||||
After cloning this repository, you must choose the tag to run:
|
||||
|
||||
```sh
|
||||
git clone git@github.com:ansible/awx-operator.git
|
||||
cd awx-operator
|
||||
@@ -20,17 +21,23 @@ export VERSION=<tag>
|
||||
export VERSION=2.7.2
|
||||
```
|
||||
|
||||
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/ )
|
||||
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/>)
|
||||
|
||||
> Some things may need to be configured slightly differently for different Kubernetes flavors for the networking aspects. When installing on Kind, see the [kind install docs](./kind-install.md) for more details.
|
||||
!!! tip
|
||||
If you don't have a Kubernetes cluster, you can use [Minikube](https://minikube.sigs.k8s.io/docs/) for testing purposes. See the [Minikube install docs](./creating-a-minikube-cluster-for-testing.md) for more details.
|
||||
|
||||
!!! note
|
||||
Some things may need to be configured slightly differently for different Kubernetes flavors for the networking aspects. When installing on Kind, see the [kind install docs](./kind-install.md) for more details.
|
||||
|
||||
There is a make target you can run:
|
||||
```
|
||||
|
||||
```sh
|
||||
make deploy
|
||||
```
|
||||
|
||||
If you have a custom operator image you have built, you can specify it with:
|
||||
```
|
||||
|
||||
```sh
|
||||
IMG=quay.io/$YOURNAMESPACE/awx-operator:$YOURTAG make deploy
|
||||
```
|
||||
|
||||
@@ -52,11 +59,12 @@ images:
|
||||
namespace: awx
|
||||
```
|
||||
|
||||
> **TIP:** If you need to change any of the default settings for the operator (such as resources.limits), you can add [patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) at the bottom of your kustomization.yaml file.
|
||||
!!! tip
|
||||
If you need to change any of the default settings for the operator (such as resources.limits), you can add [patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) at the bottom of your kustomization.yaml file.
|
||||
|
||||
Install the manifests by running this:
|
||||
|
||||
```
|
||||
```sh
|
||||
$ kubectl apply -k .
|
||||
namespace/awx created
|
||||
customresourcedefinition.apiextensions.k8s.io/awxbackups.awx.ansible.com created
|
||||
@@ -77,7 +85,7 @@ deployment.apps/awx-operator-controller-manager created
|
||||
|
||||
Wait a bit and you should have the `awx-operator` running:
|
||||
|
||||
```
|
||||
```sh
|
||||
$ kubectl get pods -n awx
|
||||
NAME READY STATUS RESTARTS AGE
|
||||
awx-operator-controller-manager-66ccd8f997-rhd4z 2/2 Running 0 11s
|
||||
@@ -85,13 +93,14 @@ awx-operator-controller-manager-66ccd8f997-rhd4z 2/2 Running 0
|
||||
|
||||
So we don't have to keep repeating `-n awx`, let's set the current namespace for `kubectl`:
|
||||
|
||||
```
|
||||
$ kubectl config set-context --current --namespace=awx
|
||||
```sh
|
||||
kubectl config set-context --current --namespace=awx
|
||||
```
|
||||
|
||||
Next, create a file named `awx-demo.yml` in the same folder 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.
|
||||
!!! note
|
||||
If you deploy more than one AWX instance to the same namespace, be sure to use unique names.
|
||||
|
||||
```yaml
|
||||
---
|
||||
@@ -103,7 +112,8 @@ spec:
|
||||
service_type: nodeport
|
||||
```
|
||||
|
||||
> It may make sense to create and specify your own secret key for your deployment so that if the k8s secret gets deleted, it can be re-created if needed. If it is not provided, one will be auto-generated, but cannot be recovered if lost. Read more [here](../user-guide/admin-user-account-configuration.md#secret-key-configuration).
|
||||
!!! tip
|
||||
It may make sense to create and specify your own secret key for your deployment so that if the k8s secret gets deleted, it can be re-created if needed. If it is not provided, one will be auto-generated, but cannot be recovered if lost. Read more [here](../user-guide/admin-user-account-configuration.md#secret-key-configuration).
|
||||
|
||||
If you are on Openshift, you can take advantage of Routes by specifying the following your spec. This will automatically create a Route for you with a custom hostname. This can be found on the Route section of the Openshift Console.
|
||||
|
||||
@@ -118,8 +128,7 @@ spec:
|
||||
ingress_type: Route
|
||||
```
|
||||
|
||||
|
||||
Make sure to add this new file to the list of "resources" in your `kustomization.yaml` file:
|
||||
Make sure to add this new file to the list of `resources` in your `kustomization.yaml` file:
|
||||
|
||||
```yaml
|
||||
...
|
||||
@@ -132,19 +141,13 @@ resources:
|
||||
|
||||
Finally, apply the changes to create the AWX instance in your cluster:
|
||||
|
||||
```
|
||||
```sh
|
||||
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:
|
||||
|
||||
```
|
||||
$ kubectl logs -f deployments/awx-operator-controller-manager -c awx-manager
|
||||
```
|
||||
|
||||
After a few seconds, you should see the operator begin to create new resources:
|
||||
|
||||
```
|
||||
```sh
|
||||
$ kubectl get pods -l "app.kubernetes.io/managed-by=awx-operator"
|
||||
NAME READY STATUS RESTARTS AGE
|
||||
awx-demo-77d96f88d5-pnhr8 4/4 Running 0 3m24s
|
||||
@@ -156,19 +159,19 @@ awx-demo-postgres ClusterIP None <none> 5432/TCP 4m4s
|
||||
awx-demo-service NodePort 10.109.40.38 <none> 80:31006/TCP 3m56s
|
||||
```
|
||||
|
||||
Once deployed, the AWX instance will be accessible by running:
|
||||
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:
|
||||
|
||||
```sh
|
||||
kubectl logs -f deployments/awx-operator-controller-manager -c awx-manager
|
||||
```
|
||||
$ minikube service -n awx awx-demo-service --url
|
||||
```
|
||||
|
||||
Once deployed, your AWX instance should now be reachable at `http://localhost:<assigned-nodeport>/` (in this case, `http://localhost:31006/`).
|
||||
|
||||
By default, the admin user is `admin` and the password is available in the `<resourcename>-admin-password` secret. To retrieve the admin password, run:
|
||||
|
||||
```
|
||||
```sh
|
||||
$ kubectl get secret awx-demo-admin-password -o jsonpath="{.data.password}" | base64 --decode ; echo
|
||||
yDL2Cx5Za94g9MvBP6B73nzVLlmfgPjR
|
||||
```
|
||||
|
||||
You just completed the most basic install of an AWX instance via this operator. Congratulations!!!
|
||||
|
||||
For an example using the Nginx Ingress Controller in Minikube, don't miss our [demo video](https://asciinema.org/a/416946).
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
### Creating a minikube cluster for testing
|
||||
# Creating a minikube cluster for testing
|
||||
|
||||
If you do not have an existing cluster, the `awx-operator` can be deployed on a [Minikube](https://minikube.sigs.k8s.io/docs/) cluster for testing purposes. Due to different OS and hardware environments, please refer to the official Minikube documentation for further information.
|
||||
|
||||
```
|
||||
```sh
|
||||
$ minikube start --cpus=4 --memory=6g --addons=ingress
|
||||
😄 minikube v1.23.2 on Fedora 34
|
||||
✨ Using the docker driver based on existing profile
|
||||
@@ -22,7 +22,7 @@ $ minikube start --cpus=4 --memory=6g --addons=ingress
|
||||
|
||||
Once Minikube is deployed, check if the node(s) and `kube-apiserver` communication is working as expected.
|
||||
|
||||
```
|
||||
```sh
|
||||
$ minikube kubectl -- get nodes
|
||||
NAME STATUS ROLES AGE VERSION
|
||||
minikube Ready control-plane,master 113s v1.22.2
|
||||
@@ -45,6 +45,17 @@ It is not required for `kubectl` to be separately installed since it comes alrea
|
||||
|
||||
Let's create an alias for easier usage:
|
||||
|
||||
```sh
|
||||
alias kubectl="minikube kubectl --"
|
||||
```
|
||||
$ alias kubectl="minikube kubectl --"
|
||||
```
|
||||
|
||||
Now, you can proceed with the installation of the AWX Operator and AWX. Please refer to the [Basic Install](basic-install.md) for further instructions.
|
||||
|
||||
!!! tip
|
||||
Once your AWX has been deployed, the AWX instance will be accessible by running:
|
||||
|
||||
```sh
|
||||
minikube service -n awx awx-demo-service --url
|
||||
```
|
||||
|
||||
For an example using the Nginx Ingress Controller in Minikube, don't miss our [demo video](https://asciinema.org/a/416946).
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
### Helm Install on existing cluster
|
||||
|
||||
For those that wish to use [Helm](https://helm.sh/) to install the awx-operator to an existing K8s cluster:
|
||||
|
||||
The helm chart is generated from the `helm-chart` Makefile section using the starter files in `.helm/starter`. Consult [the documentation](https://github.com/ansible/awx-operator/blob/devel/.helm/starter/README.md) on how to customize the AWX resource with your own values.
|
||||
|
||||
```bash
|
||||
$ helm repo add awx-operator https://ansible.github.io/awx-operator/
|
||||
"awx-operator" has been added to your repositories
|
||||
|
||||
$ helm repo update
|
||||
Hang tight while we grab the latest from your chart repositories...
|
||||
...Successfully got an update from the "awx-operator" chart repository
|
||||
Update Complete. ⎈Happy Helming!⎈
|
||||
|
||||
$ helm search repo awx-operator
|
||||
NAME CHART VERSION APP VERSION DESCRIPTION
|
||||
awx-operator/awx-operator 0.17.1 0.17.1 A Helm chart for the AWX Operator
|
||||
|
||||
$ helm install -n awx --create-namespace my-awx-operator awx-operator/awx-operator
|
||||
NAME: my-awx-operator
|
||||
LAST DEPLOYED: Thu Feb 17 22:09:05 2022
|
||||
NAMESPACE: default
|
||||
STATUS: deployed
|
||||
REVISION: 1
|
||||
TEST SUITE: None
|
||||
NOTES:
|
||||
Helm Chart 0.17.1
|
||||
```
|
||||
@@ -1,2 +0,0 @@
|
||||
|
||||
This Kubernetes Operator is meant to be deployed in your Kubernetes cluster(s) and can be used to install and manage the lifecycle of an AWX instance in the same namespace.
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
## Kind Install
|
||||
|
||||
Install Kind by running the following
|
||||
Install Kind by running the following. Refer to the [official Kind documentation](https://kind.sigs.k8s.io/docs/user/quick-start/) for more information.
|
||||
|
||||
```
|
||||
```sh
|
||||
# For Intel Macs
|
||||
[ $(uname -m) = x86_64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.20.0/kind-darwin-amd64
|
||||
# For M1 / ARM Macs
|
||||
@@ -13,9 +13,6 @@ chmod +x ./kind
|
||||
mv ./kind /some-dir-in-your-PATH/kind
|
||||
```
|
||||
|
||||
> https://kind.sigs.k8s.io/docs/user/quick-start/
|
||||
|
||||
|
||||
### Create the Kind cluster
|
||||
|
||||
Create a file called `kind.config`
|
||||
@@ -35,40 +32,39 @@ nodes:
|
||||
|
||||
Then create a cluster using that config
|
||||
|
||||
```
|
||||
```sh
|
||||
kind create cluster --config=kind.config
|
||||
```
|
||||
|
||||
Set cluster context for kubectl
|
||||
|
||||
```
|
||||
```sh
|
||||
kubectl cluster-info --context kind-kind
|
||||
```
|
||||
|
||||
Install NGINX Ingress Controller
|
||||
|
||||
```
|
||||
```sh
|
||||
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/kind/deploy.yaml
|
||||
```
|
||||
|
||||
|
||||
## AWX
|
||||
|
||||
Set the namespace context
|
||||
|
||||
```
|
||||
```sh
|
||||
kubectl config set-context --current --namespace=awx
|
||||
```
|
||||
|
||||
Checkout the tag you want to install from
|
||||
|
||||
```
|
||||
```sh
|
||||
git checkout 2.7.2
|
||||
```
|
||||
|
||||
Create a file named `kustomization.yaml` in the root of your local awx-operator clone. Include the following:
|
||||
|
||||
```
|
||||
```sh
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
@@ -86,14 +82,13 @@ namespace: awx
|
||||
|
||||
Run the following to apply the yaml
|
||||
|
||||
```
|
||||
```sh
|
||||
kubectl apply -k .
|
||||
```
|
||||
|
||||
|
||||
Create a file called `awx-cr.yaml` with the following contents and any configuration changes you may wish to add.
|
||||
|
||||
```
|
||||
```yaml
|
||||
---
|
||||
apiVersion: awx.ansible.com/v1beta1
|
||||
kind: AWX
|
||||
@@ -106,20 +101,19 @@ spec:
|
||||
|
||||
Create your AWX CR
|
||||
|
||||
```
|
||||
oc create -f awx-cr.yaml
|
||||
```sh
|
||||
kubectl create -f awx-cr.yaml
|
||||
```
|
||||
|
||||
Your AWX instance should now be reacheable at http://localhost:32000/
|
||||
|
||||
> If you configured a custom nodeport_port, you can find it by running `kubectl -n awx get svc awx-demo-service`
|
||||
|
||||
Your AWX instance should now be reachable at <http://localhost:32000/>
|
||||
|
||||
!!! note
|
||||
If you configured a custom `nodeport_port`, you can find it by running `kubectl -n awx get svc awx-demo-service`
|
||||
|
||||
## Cleanup
|
||||
|
||||
When you are done, you can delete all of this by running
|
||||
|
||||
```
|
||||
```sh
|
||||
kind delete cluster
|
||||
```
|
||||
|
||||
@@ -19,7 +19,8 @@ stringData:
|
||||
type: Opaque
|
||||
```
|
||||
|
||||
**Note**: `<resourcename>` must match the `name` of the AWX object you are creating. In our example below, it is `awx`.
|
||||
!!! note
|
||||
`<resourcename>` must match the `name` of the AWX object you are creating. In our example below, it is `awx`.
|
||||
|
||||
### Old Database Credentials
|
||||
|
||||
@@ -41,16 +42,14 @@ stringData:
|
||||
type: Opaque
|
||||
```
|
||||
|
||||
> For `host`, a URL resolvable by the cluster could look something like `postgresql.<namespace>.svc.<cluster domain>`, where `<namespace>` is filled in with the namespace of the AWX deployment you are migrating data from, and `<cluster domain>` is filled in with the internal kubernretes cluster domain (In most cases it's `cluster.local`).
|
||||
!!! note
|
||||
For `host`, a URL resolvable by the cluster could look something like `postgresql.<namespace>.svc.<cluster domain>`, where `<namespace>` is filled in with the namespace of the AWX deployment you are migrating data from, and `<cluster domain>` is filled in with the internal kubernetes cluster domain (In most cases it's `cluster.local`).
|
||||
|
||||
If your AWX deployment is already using an external database server or its database is otherwise not managed
|
||||
by the AWX deployment, you can instead create the same secret as above but omit the `-old-` from the `name`.
|
||||
In the next section pass it in through `postgres_configuration_secret` instead, omitting the `_old_`
|
||||
from the key and ensuring the value matches the name of the secret. This will make AWX pick up on the existing
|
||||
database and apply any pending migrations. It is strongly recommended to backup your database beforehand.
|
||||
If your AWX deployment is already using an external database server or its database is otherwise not managed by the AWX deployment, you can instead create the same secret as above but omit the `-old-` from the `name`.
|
||||
In the next section pass it in through `postgres_configuration_secret` instead, omitting the `_old_` from the key and ensuring the value matches the name of the secret. This will make AWX pick up on the existing database and apply any pending migrations.
|
||||
It is strongly recommended to backup your database beforehand.
|
||||
|
||||
The postgresql pod for the old deployment is used when streaming data to the new postgresql pod. If your postgresql pod has a custom label,
|
||||
you can pass that via the `postgres_label_selector` variable to make sure the postgresql pod can be found.
|
||||
The postgresql pod for the old deployment is used when streaming data to the new postgresql pod. If your postgresql pod has a custom label, you can pass that via the `postgres_label_selector` variable to make sure the postgresql pod can be found.
|
||||
|
||||
## Deploy AWX
|
||||
|
||||
@@ -66,7 +65,16 @@ spec:
|
||||
secret_key_secret: <resourcename>-secret-key
|
||||
...
|
||||
```
|
||||
### Exclude postgreSQL tables during migration (optional)
|
||||
|
||||
Use the `pg_dump_suffix` parameter under `AWX.spec` to customize the pg_dump command that will execute during migration. This variable will append your provided pg_dump parameters to the end of the 'standard' command. For example, to exclude the data from 'main_jobevent' and 'main_job' to decrease the size of the backup use:
|
||||
|
||||
```
|
||||
pg_dump_suffix: "--exclude-table-data 'main_jobevent*' --exclude-table-data 'main_job'"
|
||||
```
|
||||
|
||||
## Important Note
|
||||
|
||||
If you intend to put all the above in one file, make sure to separate each block with three dashes like so:
|
||||
|
||||
```yaml
|
||||
@@ -79,4 +87,5 @@ If you intend to put all the above in one file, make sure to separate each block
|
||||
---
|
||||
# AWX Config
|
||||
```
|
||||
|
||||
Failing to do so will lead to an inoperable setup.
|
||||
|
||||
@@ -50,6 +50,7 @@ idna==3.6
|
||||
jinja2==3.1.3
|
||||
# via
|
||||
# mkdocs
|
||||
# mkdocs-macros-plugin
|
||||
# mkdocs-material
|
||||
# mkdocstrings
|
||||
jsmin==3.0.1
|
||||
@@ -88,18 +89,21 @@ mkdocs==1.5.3
|
||||
# mkdocs-autorefs
|
||||
# mkdocs-gen-files
|
||||
# mkdocs-htmlproofer-plugin
|
||||
# mkdocs-macros-plugin
|
||||
# mkdocs-material
|
||||
# mkdocs-minify-plugin
|
||||
# mkdocs-monorepo-plugin
|
||||
# mkdocstrings
|
||||
mkdocs-ansible==24.2.1
|
||||
# via -r docs/requirements.in
|
||||
mkdocs-ansible==24.3.1
|
||||
# via -r requirements.in
|
||||
mkdocs-autorefs==0.5.0
|
||||
# via mkdocstrings
|
||||
mkdocs-gen-files==0.5.0
|
||||
# via mkdocs-ansible
|
||||
mkdocs-htmlproofer-plugin==1.0.0
|
||||
# via mkdocs-ansible
|
||||
mkdocs-macros-plugin==1.0.5
|
||||
# via mkdocs-ansible
|
||||
mkdocs-material==9.2.6
|
||||
# via mkdocs-ansible
|
||||
mkdocs-material-extensions==1.3.1
|
||||
@@ -145,12 +149,15 @@ pymdown-extensions==10.0.1
|
||||
pyquery==2.0.0
|
||||
# via readtime
|
||||
python-dateutil==2.8.2
|
||||
# via ghp-import
|
||||
# via
|
||||
# ghp-import
|
||||
# mkdocs-macros-plugin
|
||||
python-slugify==8.0.4
|
||||
# via mkdocs-monorepo-plugin
|
||||
pyyaml==6.0.1
|
||||
# via
|
||||
# mkdocs
|
||||
# mkdocs-macros-plugin
|
||||
# pymdown-extensions
|
||||
# pyyaml-env-tag
|
||||
pyyaml-env-tag==0.1
|
||||
@@ -168,6 +175,8 @@ six==1.16.0
|
||||
# via python-dateutil
|
||||
soupsieve==2.5
|
||||
# via beautifulsoup4
|
||||
termcolor==2.4.0
|
||||
# via mkdocs-macros-plugin
|
||||
text-unidecode==1.3
|
||||
# via python-slugify
|
||||
tinycss2==1.2.1
|
||||
|
||||
@@ -4,13 +4,14 @@
|
||||
|
||||
When the operator is deploying AWX, it is running the `installer` role inside the operator container. If the AWX CR's status is `Failed`, it is often useful to look at the awx-operator container logs, which shows the output of the installer role. To see these logs, run:
|
||||
|
||||
```
|
||||
```sh
|
||||
kubectl logs deployments/awx-operator-controller-manager -c awx-manager -f
|
||||
```
|
||||
|
||||
### Inspect k8s Resources
|
||||
|
||||
Past that, it is often useful to inspect various resources the AWX Operator manages like:
|
||||
|
||||
* awx
|
||||
* awxbackup
|
||||
* awxrestore
|
||||
@@ -24,6 +25,7 @@ Past that, it is often useful to inspect various resources the AWX Operator mana
|
||||
* serviceaccount
|
||||
|
||||
And if installing via OperatorHub and OLM:
|
||||
|
||||
* subscription
|
||||
* csv
|
||||
* installPlan
|
||||
@@ -31,7 +33,7 @@ And if installing via OperatorHub and OLM:
|
||||
|
||||
To inspect these resources you can use these commands
|
||||
|
||||
```
|
||||
```sh
|
||||
# Inspecting k8s resources
|
||||
kubectl describe -n <namespace> <resource> <resource-name>
|
||||
kubectl get -n <namespace> <resource> <resource-name> -o yaml
|
||||
@@ -41,7 +43,6 @@ kubectl logs -n <namespace> <resource> <resource-name>
|
||||
kubectl exec -it -n <namespace> <pod> <pod-name>
|
||||
```
|
||||
|
||||
|
||||
### Configure No Log
|
||||
|
||||
It is possible to show task output for debugging by setting no_log to false on the AWX CR spec.
|
||||
@@ -49,7 +50,7 @@ This will show output in the awx-operator logs for any failed tasks where no_log
|
||||
|
||||
For example:
|
||||
|
||||
```
|
||||
```sh
|
||||
---
|
||||
apiVersion: awx.ansible.com/v1beta1
|
||||
kind: AWX
|
||||
@@ -63,19 +64,19 @@ spec:
|
||||
|
||||
## Iterating on the installer without deploying the operator
|
||||
|
||||
Go through the [normal basic install](https://github.com/ansible/awx-operator/blob/devel/README.md#basic-install) steps.
|
||||
Go through the [normal basic install](../installation/basic-install.md) steps.
|
||||
|
||||
Install some dependencies:
|
||||
|
||||
```
|
||||
$ ansible-galaxy collection install -r molecule/requirements.yml
|
||||
$ pip install -r molecule/requirements.txt
|
||||
```sh
|
||||
ansible-galaxy collection install -r molecule/requirements.yml
|
||||
pip install -r molecule/requirements.txt
|
||||
```
|
||||
|
||||
To prevent the changes we're about to make from being overwritten, scale down any running instance of the operator:
|
||||
|
||||
```
|
||||
$ kubectl scale deployment awx-operator-controller-manager --replicas=0
|
||||
```sh
|
||||
kubectl scale deployment awx-operator-controller-manager --replicas=0
|
||||
```
|
||||
|
||||
Create a playbook that invokes the installer role (the operator uses ansible-runner's role execution feature):
|
||||
@@ -96,8 +97,11 @@ Create a vars file:
|
||||
ansible_operator_meta:
|
||||
name: awx
|
||||
namespace: awx
|
||||
set_self_labels: false
|
||||
update_status: false
|
||||
service_type: nodeport
|
||||
```
|
||||
|
||||
The vars file will replace the awx resource so any value that you wish to over ride using the awx resource, put in the vars file. For example, if you wish to use your own image, version and pull policy, you can specify it like below:
|
||||
|
||||
```yaml
|
||||
@@ -106,6 +110,8 @@ The vars file will replace the awx resource so any value that you wish to over r
|
||||
ansible_operator_meta:
|
||||
name: awx
|
||||
namespace: awx
|
||||
set_self_labels: false
|
||||
update_status: false
|
||||
service_type: nodeport
|
||||
image: $DEV_DOCKER_TAG_BASE/awx_kube_devel
|
||||
image_pull_policy: Always
|
||||
@@ -114,14 +120,13 @@ image_version: $COMPOSE_TAG
|
||||
|
||||
Run the installer:
|
||||
|
||||
```
|
||||
$ ansible-playbook run.yml -e @vars.yml -v
|
||||
```sh
|
||||
ansible-playbook run.yml -e @vars.yml -v
|
||||
```
|
||||
|
||||
Grab the URL and admin password:
|
||||
|
||||
```
|
||||
$ minikube service awx-service --url -n awx
|
||||
$ minikube kubectl get secret awx-admin-password -- -o jsonpath="{.data.password}" | base64 --decode
|
||||
```sh
|
||||
$ kubectl get secret awx-admin-password -- -o jsonpath="{.data.password}" | base64 --decode ; echo
|
||||
LU6lTfvnkjUvDwL240kXKy1sNhjakZmT
|
||||
```
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
### Uninstall ###
|
||||
# Uninstall
|
||||
|
||||
To uninstall an AWX deployment instance, you basically need to remove the AWX kind related to that instance. For example, to delete an AWX instance named awx-demo, you would do:
|
||||
|
||||
```
|
||||
```sh
|
||||
$ kubectl delete awx awx-demo
|
||||
awx.awx.ansible.com "awx-demo" deleted
|
||||
```
|
||||
|
||||
Deleting an AWX instance will remove all related deployments and statefulsets, however, persistent volumes and secrets will remain. To enforce secrets also getting removed, you can use `garbage_collect_secrets: true`.
|
||||
|
||||
**Note**: If you ever intend to recover an AWX from an existing database you will need a copy of the secrets in order to perform a successful recovery.
|
||||
!!! note
|
||||
If you ever intend to recover an AWX from an existing database you will need a copy of the secrets in order to perform a successful recovery.
|
||||
|
||||
@@ -1,59 +1,56 @@
|
||||
### Upgrading
|
||||
# Upgrading
|
||||
|
||||
To upgrade AWX, it is recommended to upgrade the awx-operator to the version that maps to the desired version of AWX. To find the version of AWX that will be installed by the awx-operator by default, check the version specified in the `DEFAULT_AWX_VERSION` variable for that particular release. You can do so by running the following command
|
||||
|
||||
To upgrade AWX, it is recommended to upgrade the awx-operator to the version that maps to the desired version of AWX. To find the version of AWX that will be installed by the awx-operator by default, check the version specified in the `DEFAULT_AWX_VERSION` variable for that particular release. You can do so by running the following command
|
||||
```shell
|
||||
AWX_OPERATOR_VERSION=2.8.0
|
||||
docker run --entrypoint="" quay.io/ansible/awx-operator:$AWX_OPERATOR_VERSION bash -c "env | grep DEFAULT_AWX_VERSION"
|
||||
```
|
||||
|
||||
Apply the awx-operator.yml for that release to upgrade the operator, and in turn also upgrade your AWX deployment.
|
||||
Make sure you have a backup before upgrading, then upgrade operator by invoking `make deploy` on the desired tag or by applying the `kustomization.yaml` that contains desired version of the operator, and in turn also upgrade your AWX deployment.
|
||||
|
||||
#### Backup
|
||||
## Backup
|
||||
|
||||
The first part of any upgrade should be a backup. Note, there are secrets in the pod which work in conjunction with the database. Having just a database backup without the required secrets will not be sufficient for recovering from an issue when upgrading to a new version. See the [backup role documentation](https://github.com/ansible/awx-operator/tree/devel/roles/backup) for information on how to backup your database and secrets.
|
||||
|
||||
In the event you need to recover the backup see the [restore role documentation](https://github.com/ansible/awx-operator/tree/devel/roles/restore). *Before Restoring from a backup*, be sure to:
|
||||
* delete the old existing AWX CR
|
||||
* delete the persistent volume claim (PVC) for the database from the old deployment, which has a name like `postgres-15-<deployment-name>-postgres-15-0`
|
||||
In the event you need to recover the backup see the [restore role documentation](https://github.com/ansible/awx-operator/tree/devel/roles/restore). _Before Restoring from a backup_, be sure to:
|
||||
|
||||
- delete the old existing AWX CR
|
||||
- delete the persistent volume claim (PVC) for the database from the old deployment, which has a name like `postgres-15-<deployment-name>-postgres-15-0`
|
||||
|
||||
**Note**: Do not delete the namespace/project, as that will delete the backup and the backup's PVC as well.
|
||||
|
||||
|
||||
#### PostgreSQL Upgrade Considerations
|
||||
## PostgreSQL Upgrade Considerations
|
||||
|
||||
If there is a PostgreSQL major version upgrade, after the data directory on the PVC is migrated to the new version, the old PVC is kept by default.
|
||||
This provides the ability to roll back if needed, but can take up extra storage space in your cluster unnecessarily. You can configure it to be deleted automatically
|
||||
after a successful upgrade by setting the following variable on the AWX spec.
|
||||
|
||||
This provides the ability to roll back if needed, but can take up extra storage space in your cluster unnecessarily. You can configure it to be deleted automatically after a successful upgrade by setting the following variable on the AWX spec.
|
||||
|
||||
```yaml
|
||||
spec:
|
||||
postgres_keep_pvc_after_upgrade: False
|
||||
spec:
|
||||
postgres_keep_pvc_after_upgrade: False
|
||||
```
|
||||
|
||||
## Caveats for upgrading to v0.14.0
|
||||
|
||||
#### v0.14.0
|
||||
### Cluster-scope to Namespace-scope considerations
|
||||
|
||||
##### Cluster-scope to Namespace-scope considerations
|
||||
Starting with awx-operator 0.14.0, AWX can only be deployed in the namespace that the operator exists in. This is called a namespace-scoped operator. If you are upgrading from an earlier version, you will want to delete your existing `awx-operator` service account, role and role binding.
|
||||
|
||||
Starting with awx-operator 0.14.0, AWX can only be deployed in the namespace that the operator exists in. This is called a namespace-scoped operator. If you are upgrading from an earlier version, you will want to
|
||||
delete your existing `awx-operator` service account, role and role binding.
|
||||
|
||||
##### Project is now based on v1.x of the operator-sdk project
|
||||
### Project is now based on v1.x of the operator-sdk project
|
||||
|
||||
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
|
||||
### Steps to upgrade to v0.14.0
|
||||
|
||||
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
|
||||
```sh
|
||||
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.
|
||||
Then install the new AWX Operator by following the instructions in [Basic Install](../installation/basic-install.md). 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.
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
### Admin user account configuration
|
||||
# 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**.
|
||||
!!! warning
|
||||
`admin_password_secret` must be a Kubernetes secret and not your text clear password.
|
||||
|
||||
If `admin_password_secret` is not provided, the operator will look for a secret named `<resourcename>-admin-password` for the admin password. If it is not present, the operator will generate a password and create a Secret from it named `<resourcename>-admin-password`.
|
||||
|
||||
@@ -28,16 +28,16 @@ stringData:
|
||||
password: mysuperlongpassword
|
||||
```
|
||||
|
||||
### Secret Key Configuration
|
||||
## Secret Key Configuration
|
||||
|
||||
This key is used to encrypt sensitive data in the database.
|
||||
|
||||
| Name | Description | Default |
|
||||
| ----------------- | ----------------------------------------------------- | ---------------- |
|
||||
| secret_key_secret | Secret that contains the symmetric key for encryption | Generated |
|
||||
| secret_key_secret | Secret that contains the symmetric key for encryption | Generated |
|
||||
|
||||
|
||||
> :warning: **secret_key_secret must be a Kubernetes secret and not your text clear secret value**.
|
||||
!!! warning
|
||||
`secret_key_secret` must be a Kubernetes secret and not your text clear secret value.
|
||||
|
||||
If `secret_key_secret` is not provided, the operator will look for a secret named `<resourcename>-secret-key` for the secret key. If it is not present, the operator will generate a password and create a Secret from it named `<resourcename>-secret-key`. It is important to not delete this secret as it will be needed for upgrades and if the pods get scaled down at any point. If you are using a GitOps flow, you will want to pass a secret key secret.
|
||||
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
### Adding Execution Nodes
|
||||
Starting with AWX Operator v0.30.0 and AWX v21.7.0, standalone execution nodes can be added to your deployments.
|
||||
See [Managing Capacity With Instances](https://ansible.readthedocs.io/projects/awx/en/latest/administration/instances.html) chapter of the AWX Administration Guide for information about this feature.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#### Assigning AWX pods to specific nodes
|
||||
# Assigning AWX pods to specific nodes
|
||||
|
||||
You can constrain the AWX pods created by the operator to run on a certain subset of nodes. `node_selector` and `postgres_selector` constrains
|
||||
the AWX pods to run only on the nodes that match all the specified key/value pairs. `tolerations` and `postgres_tolerations` allow the AWX
|
||||
@@ -6,8 +6,8 @@ pods to be scheduled onto nodes with matching taints.
|
||||
The ability to specify topologySpreadConstraints is also allowed through `topology_spread_constraints`
|
||||
If you want to use affinity rules for your AWX pod you can use the `affinity` option.
|
||||
|
||||
If you want to constrain the web and task pods individually, you can do so by specificying the deployment type before the specific setting. For
|
||||
example, specifying `task_tolerations` will allow the AWX task pod to be scheduled onto nodes with matching taints.
|
||||
If you want to constrain the web and task pods individually, you can do so by specifying the deployment type before the specific setting. For
|
||||
example, specifying `task_tolerations` will allow the AWX task pod to be scheduled onto nodes with matching taints.
|
||||
|
||||
| Name | Description | Default |
|
||||
| -------------------------------- | ---------------------------------------- | -------------------------------- |
|
||||
@@ -88,3 +88,8 @@ spec:
|
||||
- S2
|
||||
topologyKey: topology.kubernetes.io/zone
|
||||
```
|
||||
|
||||
## Special Note on DB-Migration Job Scheduling
|
||||
|
||||
For the **db-migration job**, which applies database migrations at cluster startup, you can specify scheduling settings using the `task_*` configurations such as `task_node_selector`, `task_tolerations`, etc.
|
||||
If these task-specific settings are not defined, the job will automatically use the global AWX configurations like `node_selector` and `tolerations`.
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#### Auto upgrade
|
||||
# Auto upgrade
|
||||
|
||||
With this parameter you can influence the behavior during an operator upgrade.
|
||||
If set to `true`, the operator will upgrade the specific instance directly.
|
||||
When the value is set to `false`, and we have a running deployment, the operator will not update the AWX instance.
|
||||
This can be useful when you have multiple AWX instances which you want to upgrade step by step instead of all at once.
|
||||
|
||||
|
||||
| Name | Description | Default |
|
||||
| -------------| ---------------------------------- | ------- |
|
||||
| auto_upgrade | Automatic upgrade of AWX instances | true |
|
||||
@@ -12,11 +12,11 @@ This can be useful when you have multiple AWX instances which you want to upgrad
|
||||
Example configuration of `auto_upgrade` parameter
|
||||
|
||||
```yaml
|
||||
spec:
|
||||
auto_upgrade: true
|
||||
spec:
|
||||
auto_upgrade: true
|
||||
```
|
||||
|
||||
##### Upgrade of instances without auto upgrade
|
||||
## Upgrade of instances without auto upgrade
|
||||
|
||||
There are two ways to upgrade instances which are marked with the 'auto_upgrade: false' flag.
|
||||
|
||||
@@ -28,8 +28,10 @@ Changing flags:
|
||||
|
||||
Delete the deployment:
|
||||
|
||||
- delete the deployment object of your AWX instance
|
||||
```
|
||||
$ kubectl -n awx delete deployment <yourInstanceName>
|
||||
```
|
||||
- wait until the instance gets redeployed
|
||||
- delete the deployment object of your AWX instance
|
||||
|
||||
```sh
|
||||
kubectl -n awx delete deployment <yourInstanceName>
|
||||
```
|
||||
|
||||
- wait until the instance gets redeployed
|
||||
|
||||
@@ -1,8 +1,20 @@
|
||||
#### Container Probes
|
||||
# Container Probes
|
||||
|
||||
These parameters control the usage of liveness and readiness container probes for
|
||||
the web and task containers.
|
||||
|
||||
#### Web / Task Container Liveness Check
|
||||
!!! tip
|
||||
All of probes are disabled by default for now, to enable it, set the `*_period` parameters. For example:
|
||||
|
||||
```yaml
|
||||
spec:
|
||||
web_liveness_period: 15
|
||||
web_readiness_period: 15
|
||||
task_liveness_period: 15
|
||||
task_readiness_period: 15
|
||||
```
|
||||
|
||||
## Web / Task Container Liveness Check
|
||||
|
||||
The liveness probe queries the status of the supervisor daemon of the container. The probe will fail if it
|
||||
detects one of the services in a state other than "RUNNING".
|
||||
@@ -18,7 +30,7 @@ detects one of the services in a state other than "RUNNING".
|
||||
| task_liveness_failure_threshold| Number of consecutive failure events to identify failure of container | 3 |
|
||||
| task_liveness_timeout | Number of seconds to wait for a probe response from container | 1 |
|
||||
|
||||
#### Web Container Readiness Check
|
||||
## Web Container Readiness Check
|
||||
|
||||
This is an HTTP check against the status endpoint to confirm the system is still able to respond to web requests.
|
||||
|
||||
@@ -29,7 +41,7 @@ This is an HTTP check against the status endpoint to confirm the system is still
|
||||
| web_readiness_failure_threshold| Number of consecutive failure events to identify failure of container | 3 |
|
||||
| web_readiness_timeout | Number of seconds to wait for a probe response from container | 1 |
|
||||
|
||||
#### Task Container Readiness Check
|
||||
## Task Container Readiness Check
|
||||
|
||||
This is a command probe using the builtin check command of the awx-manage utility.
|
||||
|
||||
|
||||
@@ -1,38 +1,16 @@
|
||||
#### 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
|
||||
|
||||
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: 100m, memory: 128Mi} |
|
||||
| task_resource_requirements | Task container resource requirements | requests: {cpu: 100m, memory: 128Mi} |
|
||||
| ee_resource_requirements | EE control plane container resource requirements | requests: {cpu: 50m, memory: 64Mi} |
|
||||
| redis_resource_requirements | Redis container resource requirements | requests: {cpu: 100m, memory: 128Mi} |
|
||||
| postgres_resource_requirements | Postgres container resource requirements | requests: {cpu: 10m, memory: 64Mi} |
|
||||
| rsyslog_resource_requirements | Rsyslog container resource requirements | requests: {cpu: 100m, memory: 128Mi} |
|
||||
| init_container_resource_requirements | Init Container resource requirements | requests: {cpu: 100m, memory: 128Mi} |
|
||||
| postgres_init_container_resource_requirements | Postgres Init Container resource requirements | requests: {cpu: 10m, memory: 64Mi} |
|
||||
|
||||
| Name | Description | Default |
|
||||
| ------------------------------------ | ------------------------------------------------------------ | ------------------------------------ |
|
||||
| web_resource_requirements | Web container resource requirements | requests: {cpu: 100m, memory: 128Mi} |
|
||||
| task_resource_requirements | Task container resource requirements | requests: {cpu: 100m, memory: 128Mi} |
|
||||
| ee_resource_requirements | EE control plane container resource requirements | requests: {cpu: 50m, memory: 64Mi} |
|
||||
| redis_resource_requirements | Redis container resource requirements | requests: {cpu: 100m, memory: 128Mi} |
|
||||
| postgres_resource_requirements | Postgres container (and initContainer) resource requirements | requests: {cpu: 10m, memory: 64Mi} |
|
||||
| rsyslog_resource_requirements | Rsyslog container resource requirements | requests: {cpu: 100m, memory: 128Mi} |
|
||||
| init_container_resource_requirements | Init Container resource requirements | requests: {cpu: 100m, memory: 128Mi} |
|
||||
|
||||
Example of customization could be:
|
||||
|
||||
@@ -85,17 +63,9 @@ spec:
|
||||
limits:
|
||||
cpu: 1000m
|
||||
memory: 2Gi
|
||||
postgres_init_container_resource_requirements:
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 64Mi
|
||||
limits:
|
||||
cpu: 1000m
|
||||
memory: 2Gi
|
||||
```
|
||||
|
||||
|
||||
#### Limits and ResourceQuotas
|
||||
## Limits and ResourceQuotas
|
||||
|
||||
If the cluster you are deploying in has a ResoruceQuota, you will need to configure resource limits for all of the pods deployed in that cluster. This can be done for AWX pods on the AWX spec in the manner shown above.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#### CSRF Cookie Secure Setting
|
||||
# CSRF Cookie Secure Setting
|
||||
|
||||
With `csrf_cookie_secure`, you can pass the value for `CSRF_COOKIE_SECURE` to `/etc/tower/settings.py`
|
||||
|
||||
@@ -9,6 +9,6 @@ With `csrf_cookie_secure`, you can pass the value for `CSRF_COOKIE_SECURE` to `/
|
||||
Example configuration of the `csrf_cookie_secure` setting:
|
||||
|
||||
```yaml
|
||||
spec:
|
||||
csrf_cookie_secure: 'False'
|
||||
spec:
|
||||
csrf_cookie_secure: 'False'
|
||||
```
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
|
||||
### Custom Receptor CA
|
||||
# Custom Receptor CA
|
||||
|
||||
The control nodes on the K8S cluster will communicate with execution nodes via mutual TLS TCP connections, running via Receptor.
|
||||
Execution nodes will verify incoming connections by ensuring the x509 certificate was issued by a trusted Certificate Authority (CA).
|
||||
@@ -21,4 +20,5 @@ If this secret is created after AWX is deployed, run the following to restart th
|
||||
kubectl rollout restart deployment awx-demo
|
||||
```
|
||||
|
||||
**Important Note**, changing the receptor CA will break connections to any existing execution nodes. These nodes will enter an `unavailable` state, and jobs will not be able to run on them. Users will need to download and re-run the install bundle for each execution node. This will replace the TLS certificate files with those signed by the new CA. The execution nodes should then appear in a `ready` state after a few minutes.
|
||||
!!! warning
|
||||
Changing the receptor CA will break connections to any existing execution nodes. These nodes will enter an `unavailable` state, and jobs will not be able to run on them. Users will need to download and re-run the install bundle for each execution node. This will replace the TLS certificate files with those signed by the new CA. The execution nodes should then appear in a `ready` state after a few minutes.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#### Custom Volume and Volume Mount Options
|
||||
# Custom Volume and Volume Mount Options
|
||||
|
||||
In a scenario where custom volumes and volume mounts are required to either overwrite defaults or mount configuration files.
|
||||
|
||||
@@ -12,8 +12,8 @@ In a scenario where custom volumes and volume mounts are required to either over
|
||||
| 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).
|
||||
!!! 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).
|
||||
|
||||
Example configuration for ConfigMap
|
||||
|
||||
@@ -26,73 +26,60 @@ metadata:
|
||||
namespace: <target namespace>
|
||||
data:
|
||||
ansible.cfg: |
|
||||
[defaults]
|
||||
remote_tmp = /tmp
|
||||
[ssh_connection]
|
||||
ssh_args = -C -o ControlMaster=auto -o ControlPersist=60s
|
||||
custom.py: |
|
||||
INSIGHTS_URL_BASE = "example.org"
|
||||
AWX_CLEANUP_PATHS = True
|
||||
[defaults]
|
||||
remote_tmp = /tmp
|
||||
[ssh_connection]
|
||||
ssh_args = -C -o ControlMaster=auto -o ControlPersist=60s
|
||||
```
|
||||
|
||||
Example spec file for volumes and volume mounts
|
||||
|
||||
```yaml
|
||||
---
|
||||
spec:
|
||||
...
|
||||
extra_volumes: |
|
||||
- name: ansible-cfg
|
||||
configMap:
|
||||
defaultMode: 420
|
||||
items:
|
||||
- key: ansible.cfg
|
||||
path: ansible.cfg
|
||||
name: <resourcename>-extra-config
|
||||
- name: custom-py
|
||||
configMap:
|
||||
defaultMode: 420
|
||||
items:
|
||||
- key: custom.py
|
||||
path: custom.py
|
||||
name: <resourcename>-extra-config
|
||||
- name: shared-volume
|
||||
persistentVolumeClaim:
|
||||
claimName: my-external-volume-claim
|
||||
spec:
|
||||
...
|
||||
extra_volumes: |
|
||||
- name: ansible-cfg
|
||||
configMap:
|
||||
defaultMode: 420
|
||||
items:
|
||||
- key: ansible.cfg
|
||||
path: ansible.cfg
|
||||
name: <resourcename>-extra-config
|
||||
- name: shared-volume
|
||||
persistentVolumeClaim:
|
||||
claimName: my-external-volume-claim
|
||||
|
||||
init_container_extra_volume_mounts: |
|
||||
- name: shared-volume
|
||||
mountPath: /shared
|
||||
init_container_extra_volume_mounts: |
|
||||
- name: shared-volume
|
||||
mountPath: /shared
|
||||
|
||||
init_container_extra_commands: |
|
||||
# set proper permissions (rwx) for the awx user
|
||||
chmod 775 /shared
|
||||
chgrp 1000 /shared
|
||||
init_container_extra_commands: |
|
||||
# set proper permissions (rwx) for the awx user
|
||||
chmod 775 /shared
|
||||
chgrp 1000 /shared
|
||||
|
||||
ee_extra_volume_mounts: |
|
||||
- name: ansible-cfg
|
||||
mountPath: /etc/ansible/ansible.cfg
|
||||
subPath: ansible.cfg
|
||||
|
||||
task_extra_volume_mounts: |
|
||||
- name: custom-py
|
||||
mountPath: /etc/tower/conf.d/custom.py
|
||||
subPath: custom.py
|
||||
- name: shared-volume
|
||||
mountPath: /shared
|
||||
ee_extra_volume_mounts: |
|
||||
- name: ansible-cfg
|
||||
mountPath: /etc/ansible/ansible.cfg
|
||||
subPath: ansible.cfg
|
||||
```
|
||||
|
||||
> :warning: **Volume and VolumeMount names cannot contain underscores(_)**
|
||||
!!! warning
|
||||
**Volume and VolumeMount names cannot contain underscores(_)**
|
||||
|
||||
##### Custom UWSGI Configuration
|
||||
We allow the customization of two UWSGI parameters:
|
||||
## Custom UWSGI Configuration
|
||||
|
||||
We allow the customization of three UWSGI parameters:
|
||||
|
||||
* [processes](https://uwsgi-docs.readthedocs.io/en/latest/Options.html#processes) with `uwsgi_processes` (default 5)
|
||||
* [listen](https://uwsgi-docs.readthedocs.io/en/latest/Options.html#listen) with `uwsgi_listen_queue_size` (default 128)
|
||||
* [harakiri](https://uwsgi-docs.readthedocs.io/en/latest/Options.html#harakiri) with `uwsgi_timeout` (default 30)
|
||||
|
||||
**Note:** Increasing the listen queue beyond 128 requires that the sysctl setting net.core.somaxconn be set to an equal value or higher.
|
||||
The operator will set the appropriate securityContext sysctl value for you, but it is a required that this sysctl be added to an allowlist on the kubelet level. [See kubernetes docs about allowing this sysctl setting](https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/#enabling-unsafe-sysctls).
|
||||
|
||||
These vars relate to the vertical and horizontal scalibility of the web service.
|
||||
The `processes` and `listen` vars relate to the vertical and horizontal scalibility of the web service.
|
||||
|
||||
Increasing the number of processes allows more requests to be actively handled
|
||||
per web pod, but will consume more CPU and Memory and the resource requests
|
||||
@@ -103,7 +90,13 @@ requests (more than 128) tend to come in a short period of time, but can all be
|
||||
handled before any other time outs may apply. Also see related nginx
|
||||
configuration.
|
||||
|
||||
##### Custom Nginx Configuration
|
||||
The `uwsgi_timeout` variable determines after how many seconds a request will
|
||||
be forecibly killed by uwsgi. A "graceful" timeout signal is sent to the worker
|
||||
2 seconds prior to attempt to get a traceback of what may be causing the
|
||||
request to hang.
|
||||
|
||||
|
||||
## Custom Nginx Configuration
|
||||
|
||||
Using the [extra_volumes feature](#custom-volume-and-volume-mount-options), it is possible to extend the nginx.conf.
|
||||
|
||||
@@ -124,26 +117,70 @@ may allow the web pods to handle more "bursty" request patterns if many
|
||||
requests (more than 128) tend to come in a short period of time, but can all be
|
||||
handled before any other time outs may apply. Also see related uwsgi
|
||||
configuration.
|
||||
|
||||
* [worker_processes](http://nginx.org/en/docs/ngx_core_module.html#worker_processes) with `nginx_worker_processes` (default of 1)
|
||||
* [worker_cpu_affinity](http://nginx.org/en/docs/ngx_core_module.html#worker_cpu_affinity) with `nginx_worker_cpu_affinity` (default "auto")
|
||||
* [worker_connections](http://nginx.org/en/docs/ngx_core_module.html#worker_connections) with `nginx_worker_connections` (minimum of 1024)
|
||||
* [listen](https://nginx.org/en/docs/http/ngx_http_core_module.html#listen) with `nginx_listen_queue_size` (default same as uwsgi listen queue size)
|
||||
|
||||
## Custom Logos
|
||||
|
||||
##### Custom Favicon
|
||||
You can use custom volume mounts to mount in your own logos to be displayed instead of the AWX logo.
|
||||
There are two different logos, one to be displayed on page headers, and one for the login screen.
|
||||
|
||||
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.
|
||||
First, create configmaps for the logos from local `logo-login.svg` and `logo-header.svg` files.
|
||||
|
||||
```bash
|
||||
$ oc create configmap favicon-configmap --from-file favicon.ico
|
||||
kubectl create configmap logo-login-configmap --from-file logo-login.svg
|
||||
kubectl create configmap logo-header-configmap --from-file logo-header.svg
|
||||
```
|
||||
|
||||
Then specify the extra_volume and web_extra_volume_mounts on your AWX CR spec
|
||||
|
||||
```yaml
|
||||
---
|
||||
spec:
|
||||
...
|
||||
extra_volumes: |
|
||||
- name: logo-login
|
||||
configMap:
|
||||
defaultMode: 420
|
||||
items:
|
||||
- key: logo-login.svg
|
||||
path: logo-login.svg
|
||||
name: logo-login-configmap
|
||||
- name: logo-header
|
||||
configMap:
|
||||
defaultMode: 420
|
||||
items:
|
||||
- key: logo-header.svg
|
||||
path: logo-header.svg
|
||||
name: logo-header-configmap
|
||||
web_extra_volume_mounts: |
|
||||
- name: logo-login
|
||||
mountPath: /var/lib/awx/public/static/media/logo-login.svg
|
||||
subPath: logo-login.svg
|
||||
- name: logo-header
|
||||
mountPath: /var/lib/awx/public/static/media/logo-header.svg
|
||||
subPath: logo-header.svg
|
||||
```
|
||||
|
||||
## Custom Favicon
|
||||
|
||||
You can also 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
|
||||
kubectl 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:
|
||||
@@ -157,3 +194,7 @@ spec:
|
||||
mountPath: /var/lib/awx/public/static/media/favicon.ico
|
||||
subPath: favicon.ico
|
||||
```
|
||||
|
||||
## Custom AWX Configuration
|
||||
|
||||
Refer to the [Extra Settings](./extra-settings.md) documentation for customizing the AWX configuration.
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
#### Default execution environments from private registries
|
||||
|
||||
In order to register default execution environments from private registries, the Custom Resource needs to know about the pull credentials. Those credentials should be stored as a secret and either specified as `ee_pull_credentials_secret` at the CR spec level, or simply be present on the namespace under the name `<resourcename>-ee-pull-credentials` . Instance initialization will register a `Container registry` type credential on the deployed instance and assign it to the registered default execution environments.
|
||||
|
||||
The secret should be formatted as follows:
|
||||
|
||||
```yaml
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: <resourcename>-ee-pull-credentials
|
||||
namespace: <target namespace>
|
||||
stringData:
|
||||
url: <registry url. i.e. quay.io>
|
||||
username: <username to connect as>
|
||||
password: <password to connect with>
|
||||
ssl_verify: <Optional attribute. Whether verify ssl connection or not. Accepted values "True" (default), "False" >
|
||||
type: Opaque
|
||||
```
|
||||
|
||||
##### Control plane ee from private registry
|
||||
The images listed in "ee_images" will be added as globally available Execution Environments. The "control_plane_ee_image" will be used to run project updates. In order to use a private image for any of these you'll need to use `image_pull_secrets` to provide a list of k8s pull secrets to access it. Currently the same secret is used for any of these images supplied at install time.
|
||||
|
||||
You can create `image_pull_secret`
|
||||
```
|
||||
kubectl create secret <resoucename>-cp-pull-credentials regcred --docker-server=<your-registry-server> --docker-username=<your-name> --docker-password=<your-pword> --docker-email=<your-email>
|
||||
```
|
||||
If you need more control (for example, to set a namespace or a label on the new secret) then you can customize the Secret before storing it
|
||||
|
||||
Example spec file extra-config
|
||||
|
||||
```yaml
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: <resoucename>-cp-pull-credentials
|
||||
namespace: <target namespace>
|
||||
data:
|
||||
.dockerconfigjson: <base64 docker config>
|
||||
type: kubernetes.io/dockerconfigjson
|
||||
```
|
||||
@@ -1,16 +1,23 @@
|
||||
#### Deploying a specific version of AWX
|
||||
# Using images from private registries
|
||||
|
||||
There are a few variables that are customizable for awx the image management.
|
||||
## Available variables to use images from private registries
|
||||
|
||||
| Name | Description | Default |
|
||||
| ------------------- | ------------------------- | ----------------------------------------- |
|
||||
| image | Path of the image to pull | quay.io/ansible/awx |
|
||||
| image_version | Image version to pull | value of DEFAULT_AWX_VERSION or latest |
|
||||
| image_pull_policy | The pull policy to adopt | IfNotPresent |
|
||||
| image_pull_secrets | The pull secrets to use | None |
|
||||
| ee_images | A list of EEs to register | quay.io/ansible/awx-ee:DEFAULT_AWX_VERSION |
|
||||
| redis_image | Path of the image to pull | docker.io/redis |
|
||||
| redis_image_version | Image version to pull | latest |
|
||||
There are variables that are customizable for awx the image management.
|
||||
|
||||
| Name | Description | Default |
|
||||
| ----------------------------- | ----------------------------- | ------------------------------------------ |
|
||||
| image | Path of the image to pull | quay.io/ansible/awx |
|
||||
| image_version | Image version to pull | value of DEFAULT_AWX_VERSION or latest |
|
||||
| image_pull_policy | The pull policy to adopt | IfNotPresent |
|
||||
| image_pull_secrets | The pull secrets to use | None |
|
||||
| ee_images | A list of EEs to register | quay.io/ansible/awx-ee:DEFAULT_AWX_VERSION |
|
||||
| ee_pull_credentials_secret | The pull secret for ee_images | None |
|
||||
| redis_image | Path of the image to pull | docker.io/redis |
|
||||
| redis_image_version | Image version to pull | latest |
|
||||
| control_plane_ee_image | Image version to pull | quay.io/ansible/awx-ee:DEFAULT_AWX_VERSION |
|
||||
| init_container_image | Path of the image to pull | quay.io/ansible/awx-ee |
|
||||
| init_container_image_version | Image version to pull | value of DEFAULT_AWX_VERSION or latest |
|
||||
| init_projects_container_image | Image version to pull | quay.io/centos/centos:stream9 |
|
||||
|
||||
Example of customization could be:
|
||||
|
||||
@@ -26,6 +33,58 @@ spec:
|
||||
ee_images:
|
||||
- name: my-custom-awx-ee
|
||||
image: myorg/my-custom-awx-ee
|
||||
control_plane_ee_image: myorg/my-custom-awx-ee:latest
|
||||
init_container_image: myorg/my-custom-awx-ee
|
||||
init_container_image_version: latest
|
||||
init_projects_container_image: myorg/my-mirrored-centos:stream9
|
||||
```
|
||||
|
||||
**Note**: The `image` and `image_version` are intended for local mirroring scenarios. Please note that using a version of AWX other than the one bundled with the `awx-operator` is **not** supported. For the default values, check the [main.yml](https://github.com/ansible/awx-operator/blob/devel/roles/installer/defaults/main.yml) file.
|
||||
!!! warning
|
||||
The `image` and `image_version` are intended for local mirroring scenarios. Please note that using a version of AWX other than the one bundled with the `awx-operator` is **not** supported. For the default values, check the [main.yml](https://github.com/ansible/awx-operator/blob/devel/roles/installer/defaults/main.yml) file.
|
||||
|
||||
## Default execution environments from private registries
|
||||
|
||||
In order to register default execution environments from private registries, the Custom Resource needs to know about the pull credentials. Those credentials should be stored as a secret and either specified as `ee_pull_credentials_secret` at the CR spec level, or simply be present on the namespace under the name `<resourcename>-ee-pull-credentials` . Instance initialization will register a `Container registry` type credential on the deployed instance and assign it to the registered default execution environments.
|
||||
|
||||
The secret should be formatted as follows:
|
||||
|
||||
```yaml
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: <resourcename>-ee-pull-credentials
|
||||
namespace: <target namespace>
|
||||
stringData:
|
||||
url: <registry url. i.e. quay.io>
|
||||
username: <username to connect as>
|
||||
password: <password to connect with>
|
||||
ssl_verify: <Optional attribute. Whether verify ssl connection or not. Accepted values "True" (default), "False" >
|
||||
type: Opaque
|
||||
```
|
||||
|
||||
## Control plane ee from private registry
|
||||
|
||||
The images listed in `ee_images` will be added as globally available Execution Environments. The `control_plane_ee_image` will be used to run project updates. In order to use a private image for any of these you'll need to use `image_pull_secrets` to provide a list of k8s pull secrets to access it. Currently the same secret is used for any of these images supplied at install time.
|
||||
|
||||
You can create `image_pull_secret`
|
||||
|
||||
```sh
|
||||
kubectl create secret <resoucename>-cp-pull-credentials regcred --docker-server=<your-registry-server> --docker-username=<your-name> --docker-password=<your-pword> --docker-email=<your-email>
|
||||
```
|
||||
|
||||
If you need more control (for example, to set a namespace or a label on the new secret) then you can customize the Secret before storing it
|
||||
|
||||
Example spec file extra-config
|
||||
|
||||
```yaml
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: <resoucename>-cp-pull-credentials
|
||||
namespace: <target namespace>
|
||||
data:
|
||||
.dockerconfigjson: <base64 docker config>
|
||||
type: kubernetes.io/dockerconfigjson
|
||||
```
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
### Disable IPV6
|
||||
Starting with AWX Operator release 0.24.0,[IPV6 was enabled in ngnix configuration](https://github.com/ansible/awx-operator/pull/950) which causes
|
||||
# Disable IPv6
|
||||
|
||||
Starting with AWX Operator release 0.24.0, [IPv6 was enabled in ngnix configuration](https://github.com/ansible/awx-operator/pull/950) which causes
|
||||
upgrades and installs to fail in environments where IPv6 is not allowed. Starting in 1.1.1 release, you can set the `ipv6_disabled` flag on the AWX
|
||||
spec. If you need to use an AWX operator version between 0.24.0 and 1.1.1 in an IPv6 disabled environment, it is suggested to enabled ipv6 on worker
|
||||
nodes.
|
||||
|
||||
In order to disable ipv6 on ngnix configuration (awx-web container), add following to the AWX spec.
|
||||
|
||||
The following variables are customizable
|
||||
The following variables are customizable:
|
||||
|
||||
| Name | Description | Default |
|
||||
| ------------- | ---------------------- | ------- |
|
||||
|
||||
@@ -1,10 +1,97 @@
|
||||
#### Enabling LDAP Integration at AWX bootstrap
|
||||
# Enabling LDAP Integration at AWX bootstrap (Deprecated)
|
||||
|
||||
A sample of extra settings can be found as below. All possible options can be found here: https://django-auth-ldap.readthedocs.io/en/latest/reference.html#settings
|
||||
A sample of extra settings can be found as below. All possible options can be found here: <https://django-auth-ldap.readthedocs.io/en/latest/reference.html#settings>
|
||||
|
||||
> **NOTE:** These values are inserted into a Python file, so pay close attention to which values need quotes and which do not.
|
||||
Refer to the [Extra Settings](./extra-settings.md) page for more information on how to configure extra settings.
|
||||
|
||||
!!! tip
|
||||
To trust a custom Certificate Authority for your LDAP server, or to specify password LDAP bind DN, refer to the [Trusting a Custom Certificate Authority](./trusting-a-custom-certificate-authority.md) page.
|
||||
|
||||
## Configure LDAP integration via `extra_settings_files`
|
||||
|
||||
Create a Python file with arbitrary name, e.g. `custom_ldap_settings.py`, and add the following content for example:
|
||||
|
||||
```python title="custom_ldap_settings.py"
|
||||
AUTH_LDAP_SERVER_URI = "ldaps://ad01.abc.com:636 ldaps://ad02.abc.com:636"
|
||||
AUTH_LDAP_BIND_DN = "CN=LDAP User,OU=Service Accounts,DC=abc,DC=com"
|
||||
AUTH_LDAP_USER_SEARCH = LDAPSearch(
|
||||
"DC=abc,DC=com",
|
||||
ldap.SCOPE_SUBTREE,
|
||||
"(sAMAccountName=%(user)s)",
|
||||
)
|
||||
AUTH_LDAP_GROUP_SEARCH = LDAPSearch(
|
||||
"OU=Groups,DC=abc,DC=com",
|
||||
ldap.SCOPE_SUBTREE,
|
||||
"(objectClass=group)",
|
||||
)
|
||||
AUTH_LDAP_GROUP_TYPE = GroupOfNamesType()
|
||||
AUTH_LDAP_USER_ATTR_MAP = {
|
||||
"first_name": "givenName",
|
||||
"last_name": "sn",
|
||||
"email": "mail",
|
||||
}
|
||||
AUTH_LDAP_REQUIRE_GROUP = "CN=operators,OU=Groups,DC=abc,DC=com"
|
||||
AUTH_LDAP_USER_FLAGS_BY_GROUP = {
|
||||
"is_superuser": ["CN=admin,OU=Groups,DC=abc,DC=com"],
|
||||
}
|
||||
AUTH_LDAP_ORGANIZATION_MAP = {
|
||||
"abc": {
|
||||
"admins": "CN=admin,OU=Groups,DC=abc,DC=com",
|
||||
"remove_admins": False,
|
||||
"remove_users": False,
|
||||
"users": True,
|
||||
}
|
||||
}
|
||||
AUTH_LDAP_TEAM_MAP = {
|
||||
"admin": {
|
||||
"organization": "abc",
|
||||
"remove": True,
|
||||
"users": "CN=admin,OU=Groups,DC=abc,DC=com",
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Create a ConfigMap with the content of the above Python file.
|
||||
|
||||
```bash
|
||||
kubectl create configmap custom-ldap-settings \
|
||||
--from-file /PATH/TO/YOUR/custom_ldap_settings.py
|
||||
```
|
||||
|
||||
Then specify this ConfigMap to the `extra_settings_files` parameter.
|
||||
|
||||
```yaml
|
||||
spec:
|
||||
extra_settings_files:
|
||||
configmaps:
|
||||
- name: custom-ldap-settings
|
||||
key: custom_ldap_settings.py
|
||||
```
|
||||
|
||||
!!! note
|
||||
If you have embedded some sensitive information like passwords in the Python file, you can create and pass a Secret instead of a ConfigMap.
|
||||
|
||||
```bash
|
||||
kubectl create secret generic custom-ldap-settings \
|
||||
--from-file /PATH/TO/YOUR/custom_ldap_settings.py
|
||||
```
|
||||
|
||||
```yaml
|
||||
spec:
|
||||
extra_settings_files:
|
||||
secrets:
|
||||
- name: custom-ldap-settings
|
||||
key: custom_ldap_settings.py
|
||||
```
|
||||
|
||||
## Configure LDAP integration via `extra_settings`
|
||||
|
||||
!!! note
|
||||
These values are inserted into a Python file, so pay close attention to which values need quotes and which do not.
|
||||
|
||||
```yaml
|
||||
spec:
|
||||
extra_settings:
|
||||
- setting: AUTH_LDAP_SERVER_URI
|
||||
value: >-
|
||||
"ldaps://ad01.abc.com:636 ldaps://ad02.abc.com:636"
|
||||
@@ -35,7 +122,6 @@ A sample of extra settings can be found as below. All possible options can be fo
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
- setting: AUTH_LDAP_ORGANIZATION_MAP
|
||||
value: {
|
||||
"abc": {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#### Exporting Environment Variables to Containers
|
||||
# Exporting Environment Variables to Containers
|
||||
|
||||
If you need to export custom environment variables to your containers.
|
||||
|
||||
@@ -9,7 +9,8 @@ If you need to export custom environment variables to your containers.
|
||||
| rsyslog_extra_env | Environment variables to be added to Rsyslog 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).
|
||||
!!! 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).
|
||||
|
||||
Example configuration of environment variables
|
||||
|
||||
|
||||
@@ -1,26 +1,120 @@
|
||||
#### Extra Settings
|
||||
# Extra Settings
|
||||
|
||||
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.
|
||||
With `extra_settings` and `extra_settings_files`, you can pass multiple custom settings to AWX via the AWX Operator.
|
||||
|
||||
| Name | Description | Default |
|
||||
| -------------- | -------------- | ------- |
|
||||
| extra_settings | Extra settings | '' |
|
||||
!!! note
|
||||
Parameters configured in `extra_settings` or `extra_settings_files` are set as read-only settings in AWX. As a result, they cannot be changed in the UI after deployment.
|
||||
|
||||
**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.
|
||||
If you need to change the setting after the initial deployment, you need to change it on the AWX CR spec (for `extra_settings`) or corresponding ConfigMap or Secret (for `extra_settings_files`). After updating ConfigMap or Secret, you need to restart the AWX pods to apply the changes.
|
||||
|
||||
!!! note
|
||||
If the same setting is set in both `extra_settings` and `extra_settings_files`, the setting in `extra_settings_files` will take precedence.
|
||||
|
||||
## Add extra settings with `extra_settings`
|
||||
|
||||
You can pass extra settings by specifying the pair of the setting name and value as the `extra_settings` parameter.
|
||||
|
||||
The settings passed via `extra_settings` will be appended to the `/etc/tower/settings.py`.
|
||||
|
||||
| Name | Description | Default |
|
||||
| -------------- | -------------- | --------- |
|
||||
| extra_settings | Extra settings | `[]` |
|
||||
|
||||
Example configuration of `extra_settings` parameter
|
||||
|
||||
```yaml
|
||||
spec:
|
||||
extra_settings:
|
||||
- setting: MAX_PAGE_SIZE
|
||||
value: "500"
|
||||
spec:
|
||||
extra_settings:
|
||||
- setting: MAX_PAGE_SIZE
|
||||
value: "500"
|
||||
|
||||
- setting: AUTH_LDAP_BIND_DN
|
||||
value: "cn=admin,dc=example,dc=com"
|
||||
# LDAP is deprecated
|
||||
- setting: AUTH_LDAP_BIND_DN
|
||||
value: "cn=admin,dc=example,dc=com"
|
||||
|
||||
- setting: LOG_AGGREGATOR_LEVEL
|
||||
value: "'DEBUG'"
|
||||
- setting: LOG_AGGREGATOR_LEVEL
|
||||
value: "'DEBUG'"
|
||||
```
|
||||
|
||||
Note for some settings, such as `LOG_AGGREGATOR_LEVEL`, the value may need double quotes.
|
||||
|
||||
## Add extra settings with `extra_settings_files`
|
||||
|
||||
You can pass extra settings by specifying the additional settings files in the ConfigMaps or Secrets as the `extra_settings_files` parameter.
|
||||
|
||||
The settings files passed via `extra_settings_files` will be mounted as the files under the `/etc/tower/conf.d`.
|
||||
|
||||
| Name | Description | Default |
|
||||
| -------------------- | -------------------- | --------- |
|
||||
| extra_settings_files | Extra settings files | `{}` |
|
||||
|
||||
!!! note
|
||||
If the same setting is set in multiple files in `extra_settings_files`, it would be difficult to predict which would be adopted since these files are loaded in arbitrary order that [`glob`](https://docs.python.org/3/library/glob.html) returns. For a reliable setting, do not include the same key in more than one file.
|
||||
|
||||
Create ConfigMaps or Secrets that contain custom settings files (`*.py`).
|
||||
|
||||
```python title="custom_job_settings.py"
|
||||
AWX_TASK_ENV = {
|
||||
"HTTPS_PROXY": "http://proxy.example.com:3128",
|
||||
"HTTP_PROXY": "http://proxy.example.com:3128",
|
||||
"NO_PROXY": "127.0.0.1,localhost,.example.com"
|
||||
}
|
||||
GALAXY_TASK_ENV = {
|
||||
"ANSIBLE_FORCE_COLOR": "false",
|
||||
"GIT_SSH_COMMAND": "ssh -o StrictHostKeyChecking=no",
|
||||
}
|
||||
```
|
||||
|
||||
```python title="custom_system_settings.py"
|
||||
REMOTE_HOST_HEADERS = [
|
||||
"HTTP_X_FORWARDED_FOR",
|
||||
"REMOTE_ADDR",
|
||||
"REMOTE_HOST",
|
||||
]
|
||||
```
|
||||
|
||||
```python title="custom_passwords.py"
|
||||
SUBSCRIPTIONS_PASSWORD = "my-super-secure-subscription-password123!"
|
||||
REDHAT_PASSWORD = "my-super-secure-redhat-password123!"
|
||||
```
|
||||
|
||||
```bash title="Create ConfigMap and Secret"
|
||||
# Create ConfigMap
|
||||
kubectl create configmap my-custom-settings \
|
||||
--from-file /PATH/TO/YOUR/custom_job_settings.py \
|
||||
--from-file /PATH/TO/YOUR/custom_system_settings.py
|
||||
|
||||
# Create Secret
|
||||
kubectl create secret generic my-custom-passwords \
|
||||
--from-file /PATH/TO/YOUR/custom_passwords.py
|
||||
```
|
||||
|
||||
Then specify them in the AWX CR spec. Here is an example configuration of `extra_settings_files` parameter.
|
||||
|
||||
```yaml
|
||||
spec:
|
||||
extra_settings_files:
|
||||
configmaps:
|
||||
- name: my-custom-settings # The name of the ConfigMap
|
||||
key: custom_job_settings.py # The key in the ConfigMap, which means the file name
|
||||
- name: my-custom-settings
|
||||
key: custom_system_settings.py
|
||||
secrets:
|
||||
- name: my-custom-passwords # The name of the Secret
|
||||
key: custom_passwords.py # The key in the Secret, which means the file name
|
||||
```
|
||||
|
||||
!!! Warning "Restriction"
|
||||
There are some restrictions on the ConfigMaps or Secrets used in `extra_settings_files`.
|
||||
|
||||
- The keys in ConfigMaps or Secrets MUST be the name of python files and MUST end with `.py`
|
||||
- The keys in ConfigMaps or Secrets MUST consists of alphanumeric characters, `-`, `_` or `.`
|
||||
- The keys in ConfigMaps or Secrets are converted to the following strings, which MUST not exceed 63 characters
|
||||
- Keys in ConfigMaps: `<instance name>-<KEY>-configmap`
|
||||
- Keys in Secrets: `<instance name>-<KEY>-secret`
|
||||
- Following keys are reserved and MUST NOT be used in ConfigMaps or Secrets
|
||||
- `credentials.py`
|
||||
- `execution_environments.py`
|
||||
- `ldap.py`
|
||||
|
||||
Refer to the Kubernetes documentations ([[1]](https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/config-map-v1/), [[2]](https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/secret-v1/), [[3]](https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/volume/), [[4]](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/)) for more information about character types and length restrictions.
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
# Horizontal Pod Autoscaler (HPA)
|
||||
|
||||
Horizontal Pod Autoscaler allows Kubernetes to scale the number of replicas of
|
||||
deployments in response to configured metrics.
|
||||
|
||||
This feature conflicts with the operators ability to manage the number of static
|
||||
replicas to create for each deployment.
|
||||
|
||||
The use of the settings below will tell the operator to not manage the replicas
|
||||
field on the identified deployments even if a replicas count has been set for those
|
||||
properties in the operator resource.
|
||||
|
||||
| Name | Description | Default |
|
||||
| ---------------------- | ----------------------------------------------------------------------------- | ------- |
|
||||
| web_manage_replicas | Indicates operator should control the replicas count for the web deployment. | true |
|
||||
| task_manage_replicas | Indicates operator should control the replicas count for the task deployment. | true |
|
||||
|
||||
## Recommended Settings for HPA
|
||||
|
||||
Please see the Kubernetes documentation on how to configure the horizontal pod
|
||||
autoscaler.
|
||||
|
||||
The values for optimal HPA are cluster and need specific so general guidelines
|
||||
are not available at this time.
|
||||
19
docs/user-guide/advanced-configuration/host-aliases.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# HostAliases
|
||||
|
||||
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>
|
||||
```
|
||||
|
Before Width: | Height: | Size: 162 KiB After Width: | Height: | Size: 162 KiB |
|
Before Width: | Height: | Size: 162 KiB After Width: | Height: | Size: 162 KiB |
|
Before Width: | Height: | Size: 205 KiB After Width: | Height: | Size: 205 KiB |
@@ -1,15 +1,13 @@
|
||||
#### Labeling operator managed objects
|
||||
# Labeling operator managed objects
|
||||
|
||||
In certain situations labeling of Kubernetes objects managed by the operator
|
||||
might be desired (e.g. for owner identification purposes). For that
|
||||
`additional_labels` parameter could be used
|
||||
In certain situations labeling of Kubernetes objects managed by the operator might be desired (e.g. for owner identification purposes).
|
||||
For that `additional_labels` parameter could be used:
|
||||
|
||||
| Name | Description | Default |
|
||||
| --------------------------- | ---------------------------------------------------------------------------------------- | ------- |
|
||||
| additional_labels | Additional labels defined on the resource, which should be propagated to child resources | [] |
|
||||
|
||||
Example configuration where only `my/team` and `my/service` labels will be
|
||||
propagated to child objects (`Deployment`, `Secret`s, `ServiceAccount`, etc):
|
||||
Example configuration where only `my/team` and `my/service` labels will be propagated to child objects (`Deployment`, `Secret`s, `ServiceAccount`, etc):
|
||||
|
||||
```yaml
|
||||
apiVersion: awx.ansible.com/v1beta1
|
||||
@@ -22,7 +20,7 @@ metadata:
|
||||
my/do-not-inherit: "yes"
|
||||
spec:
|
||||
additional_labels:
|
||||
- my/team
|
||||
- my/service
|
||||
- my/team
|
||||
- my/service
|
||||
...
|
||||
```
|
||||
|
||||
@@ -86,7 +86,7 @@ spec:
|
||||
!!! tip
|
||||
AWX Operator supports both API groups `traefik.io` and `traefik.containo.us` in `ingress_api_version` for Traefik, but it is recommended to use `traefik.io` since `traefik.containo.us` is deprecated in Traefik v2.10 and is removed in Traefik v3. Refer to [Traefik documentation](https://doc.traefik.io/traefik/migration/v2/#v210) for more information about deprecation.
|
||||
|
||||
If you can't see any IngressRouteTCP resources by `kubectl` command after deploying mesh ingress, you should fully qualify the resource name with API group, `kubectl get ingressroutetcp.traefik.io` or `kubectl get traefik.containo.us` for example.
|
||||
If you can't see any IngressRouteTCP resources by `kubectl` command after deploying mesh ingress, you should fully qualify the resource name with API group, `kubectl get ingressroutetcp.traefik.io` or `kubectl get ingressroutetcp.traefik.containo.us` for example.
|
||||
|
||||
### On Kubernetes with User managed Ingress
|
||||
|
||||
@@ -168,7 +168,7 @@ spec:
|
||||
|
||||
After AWXMeshIngress has been successfully created, a new Instance with the same name will be registered to AWX and will be visible on the Instance UI page
|
||||
|
||||

|
||||

|
||||
|
||||
The Instance should have at least 2 listener addresses.
|
||||
|
||||
@@ -177,10 +177,10 @@ In this example, the mesh ingress has two listener addresses:
|
||||
- one for internal, that is used for peering to by all control nodes (top)
|
||||
- one for external, that is exposed to a route so external execution nodes can peer into it (bottom))
|
||||
|
||||

|
||||

|
||||
|
||||
When selecting peer for new instance the mesh ingress instance should now be present as a option.
|
||||

|
||||

|
||||
|
||||
For more information about how to create external remote execution and hop nodes and configuring the mesh, see AWX Documentation on [Add a instance](https://ansible.readthedocs.io/projects/awx/en/latest/administration/instances.html#add-an-instance).
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#### No Log
|
||||
# No Log
|
||||
|
||||
Configure no_log for tasks with no_log
|
||||
|
||||
| Name | Description | Default |
|
||||
@@ -8,6 +9,6 @@ Configure no_log for tasks with no_log
|
||||
Example configuration of `no_log` parameter
|
||||
|
||||
```yaml
|
||||
spec:
|
||||
no_log: true
|
||||
spec:
|
||||
no_log: true
|
||||
```
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#### Persisting Projects Directory
|
||||
# Persisting Projects Directory
|
||||
|
||||
In cases which you want to persist the `/var/lib/projects` directory, there are few variables that are customizable for the `awx-operator`.
|
||||
|
||||
|
||||
@@ -1,38 +1,17 @@
|
||||
#### Pods termination grace period
|
||||
# Pods termination grace period
|
||||
|
||||
During deployment restarts or new rollouts, when old ReplicaSet Pods are being
|
||||
terminated, the corresponding jobs which are managed (executed or controlled)
|
||||
by old AWX Pods may end up in `Error` state as there is no mechanism to
|
||||
transfer them to the newly spawned AWX Pods. To work around the problem one
|
||||
could set `termination_grace_period_seconds` in AWX spec, which does the
|
||||
following:
|
||||
During deployment restarts or new rollouts, when old ReplicaSet Pods are being terminated, the corresponding jobs which are managed (executed or controlled) by old AWX Pods may end up in `Error` state as there is no mechanism to transfer them to the newly spawned AWX Pods.
|
||||
To work around the problem one could set `termination_grace_period_seconds` in AWX spec, which does the following:
|
||||
|
||||
* It sets the corresponding
|
||||
[`terminationGracePeriodSeconds`](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-termination)
|
||||
Pod spec of the AWX Deployment to the value provided
|
||||
- It sets the corresponding [`terminationGracePeriodSeconds`](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-termination) Pod spec of the AWX Deployment to the value provided
|
||||
- The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal
|
||||
|
||||
> The grace period is the duration in seconds after the processes running in
|
||||
> the pod are sent a termination signal and the time when the processes are
|
||||
> forcibly halted with a kill signal
|
||||
|
||||
* It adds a
|
||||
[`PreStop`](https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#hook-handler-execution)
|
||||
hook script, which will keep AWX Pods in terminating state until it finished,
|
||||
up to `terminationGracePeriodSeconds`.
|
||||
|
||||
> This grace period applies to the total time it takes for both the PreStop
|
||||
> hook to execute and for the Container to stop normally
|
||||
|
||||
While the hook script just waits until the corresponding AWX Pod (instance)
|
||||
no longer has any managed jobs, in which case it finishes with success and
|
||||
hands over the overall Pod termination process to normal AWX processes.
|
||||
|
||||
One may want to set this value to the maximum duration they accept to wait for
|
||||
the affected Jobs to finish. Keeping in mind that such finishing jobs may
|
||||
increase Pods termination time in such situations as `kubectl rollout restart`,
|
||||
AWX upgrade by the operator, or Kubernetes [API-initiated
|
||||
evictions](https://kubernetes.io/docs/concepts/scheduling-eviction/api-eviction/).
|
||||
- It adds a [`PreStop`](https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#hook-handler-execution) hook script, which will keep AWX Pods in terminating state until it finished, up to `terminationGracePeriodSeconds`.
|
||||
- This grace period applies to the total time it takes for both the PreStop hook to execute and for the Container to stop normally
|
||||
- While the hook script just waits until the corresponding AWX Pod (instance) no longer has any managed jobs, in which case it finishes with success and hands over the overall Pod termination process to normal AWX processes.
|
||||
|
||||
One may want to set this value to the maximum duration they accept to wait for the affected Jobs to finish.
|
||||
Keeping in mind that such finishing jobs may increase Pods termination time in such situations as `kubectl rollout restart`, AWX upgrade by the operator, or Kubernetes [API-initiatedevictions](https://kubernetes.io/docs/concepts/scheduling-eviction/api-eviction/).
|
||||
|
||||
| Name | Description | Default |
|
||||
| -------------------------------- | --------------------------------------------------------------- | ------- |
|
||||
|
||||
@@ -1,15 +1,10 @@
|
||||
#### Priority Classes
|
||||
# Priority Classes
|
||||
|
||||
The AWX and Postgres pods can be assigned a custom PriorityClass to rank their importance compared to other pods in your cluster, which determines which pods get evicted first if resources are running low.
|
||||
First, [create your PriorityClass](https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/#priorityclass) if needed.
|
||||
Then set the name of your priority class to the control plane and postgres pods as shown below.
|
||||
|
||||
```yaml
|
||||
---
|
||||
apiVersion: awx.ansible.com/v1beta1
|
||||
kind: AWX
|
||||
metadata:
|
||||
name: awx-demo
|
||||
spec:
|
||||
...
|
||||
control_plane_priority_class: awx-demo-high-priority
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#### Privileged Tasks
|
||||
# Privileged Tasks
|
||||
|
||||
Depending on the type of tasks that you'll be running, you may find that you need the task pod to run as `privileged`. This can open yourself up to a variety of security concerns, so you should be aware (and verify that you have the privileges) to do this if necessary. In order to toggle this feature, you can add the following to your custom resource:
|
||||
|
||||
@@ -11,8 +11,8 @@ spec:
|
||||
|
||||
If you are attempting to do this on an OpenShift cluster, you will need to grant the `awx` ServiceAccount the `privileged` SCC, which can be done with:
|
||||
|
||||
```
|
||||
$ oc adm policy add-scc-to-user privileged -z awx
|
||||
```sh
|
||||
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.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#### Redis container capabilities
|
||||
# Redis container capabilities
|
||||
|
||||
Depending on your kubernetes cluster and settings you might need to grant some capabilities to the redis container so it can start. Set the `redis_capabilities` option so the capabilities are added in the deployment.
|
||||
|
||||
|
||||
@@ -1,8 +1,13 @@
|
||||
#### Scaling the Web and Task Pods independently
|
||||
# Scaling the Web and Task Pods independently
|
||||
|
||||
You can scale replicas up or down for each deployment by using the `web_replicas` or `task_replicas` respectively. You can scale all pods across both deployments by using `replicas` as well. The logic behind these CRD keys acts as such:
|
||||
|
||||
- If you specify the `replicas` field, the key passed will scale both the `web` and `task` replicas to the same number.
|
||||
- If you specify the `replicas` field, the key passed will scale both the `web` and `task` replicas to the same number.
|
||||
- If `web_replicas` or `task_replicas` is ever passed, it will override the existing `replicas` field on the specific deployment with the new key value.
|
||||
|
||||
These new replicas can be constrained in a similar manner to previous single deployments by appending the particular deployment name in front of the constraint used. More about those new constraints can be found in the [Assigning AWX pods to specific nodes](./assigning-awx-pods-to-specific-nodes.md) page.
|
||||
These new replicas can be constrained in a similar manner to previous single deployments by appending the particular deployment name in front of the constraint used. More about those new constraints can be found in the [Assigning AWX pods to specific nodes](./assigning-awx-pods-to-specific-nodes.md) page.
|
||||
|
||||
## Horizontal Pod Autoscaling
|
||||
|
||||
The operator is capable of working with Kubernetes' HPA capabilities. See [Horizontal Pod Autoscaler](./horizontal-pod-autoscaler.md)
|
||||
documentation for more information.
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
#### Service Account
|
||||
# Security Context
|
||||
|
||||
It is possible to modify some `SecurityContext` proprieties of the various deployments and stateful sets if needed.
|
||||
|
||||
| Name | Description | Default |
|
||||
| ---------------------------------- | -------------------------------------------- | ------- |
|
||||
| security_context_settings | SecurityContext for Task and Web deployments | {} |
|
||||
| postgres_security_context_settings | SecurityContext for Task and Web deployments | {} |
|
||||
|
||||
| postgres_security_context_settings | SecurityContext for PostgreSQL container | {} |
|
||||
|
||||
Example configuration securityContext for the Task and Web deployments:
|
||||
|
||||
@@ -17,11 +16,6 @@ spec:
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
```
|
||||
|
||||
|
||||
```yaml
|
||||
spec:
|
||||
postgres_security_context_settings:
|
||||
runAsNonRoot: true
|
||||
```
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#### Service Account
|
||||
# Service Account
|
||||
|
||||
If you need to modify some `ServiceAccount` proprieties
|
||||
|
||||
@@ -9,7 +9,7 @@ If you need to modify some `ServiceAccount` proprieties
|
||||
Example configuration of environment variables
|
||||
|
||||
```yaml
|
||||
spec:
|
||||
service_account_annotations: |
|
||||
eks.amazonaws.com/role-arn: arn:aws:iam::<ACCOUNT_ID>:role/<IAM_ROLE_NAME>
|
||||
spec:
|
||||
service_account_annotations: |
|
||||
eks.amazonaws.com/role-arn: arn:aws:iam::<ACCOUNT_ID>:role/<IAM_ROLE_NAME>
|
||||
```
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#### Session Cookie Secure Setting
|
||||
# Session Cookie Secure Setting
|
||||
|
||||
With `session_cookie_secure`, you can pass the value for `SESSION_COOKIE_SECURE` to `/etc/tower/settings.py`
|
||||
|
||||
|
||||