mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-09 05:44:23 +00:00
feat(awx): add example of kustomization
This commit is contained in:
9
examples/awx/README.md
Normal file
9
examples/awx/README.md
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
# AWX example
|
||||||
|
|
||||||
|
```sh
|
||||||
|
kubectl kustomize --enable-helm 'operator/' | kubectl apply -f -
|
||||||
|
kubectl apply -k 'instance/'
|
||||||
|
kubectl -n 'awx' get secret 'awx-admin-password' -o jsonpath="{.data.password}" | base64 --decode
|
||||||
|
kubectl get ingress -n 'awx' 'awx-ingress' -o jsonpath='{.status.loadBalancer.ingress[*].hostname}' \
|
||||||
|
| xargs -I{} open http://{}
|
||||||
|
```
|
||||||
2
examples/awx/instance/.gitignore
vendored
Normal file
2
examples/awx/instance/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
/db.env
|
||||||
|
/db.secret.env
|
||||||
73
examples/awx/instance/awx.yaml
Normal file
73
examples/awx/instance/awx.yaml
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
# See the installer role's defaults at
|
||||||
|
# <https://github.com/ansible/awx-operator/blob/2.19.1/roles/installer/defaults/main.yml> and any page under the
|
||||||
|
# 'Advanced configuration' section in the operator's documentation at
|
||||||
|
# <https://ansible.readthedocs.io/projects/awx-operator/en/latest/index.html> for details.
|
||||||
|
|
||||||
|
apiVersion: awx.ansible.com/v1beta1
|
||||||
|
kind: AWX
|
||||||
|
metadata:
|
||||||
|
name: awx
|
||||||
|
spec:
|
||||||
|
admin_email: admin@company.com
|
||||||
|
postgres_configuration_secret: awx-postgres-configuration
|
||||||
|
node_selector:
|
||||||
|
# force amd64 - arm images seem to be not ready
|
||||||
|
|
|
||||||
|
kubernetes.io/arch: amd64
|
||||||
|
service_type: NodePort
|
||||||
|
ingress_type: ingress
|
||||||
|
task_tolerations: |
|
||||||
|
- key: "dedicatedTo"
|
||||||
|
operator: "Equal"
|
||||||
|
value: "awx"
|
||||||
|
effect: "NoSchedule"
|
||||||
|
- key: "dedicatedTo"
|
||||||
|
operator: "Equal"
|
||||||
|
value: "awx-task"
|
||||||
|
effect: "NoSchedule"
|
||||||
|
task_affinity:
|
||||||
|
nodeAffinity:
|
||||||
|
requiredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
nodeSelectorTerms:
|
||||||
|
- matchExpressions:
|
||||||
|
- key: dedicatedTo
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
- awx
|
||||||
|
- awx-task
|
||||||
|
task_resource_requirements:
|
||||||
|
# Averages at about 17-45m vCPU and 850Mi RAM when chilling unused
|
||||||
|
# Averages at about 503m vCPU and 1094Mi RAM with one task starting
|
||||||
|
# Went as up as 1778m and 1037Mi RAM during initialization
|
||||||
|
requests:
|
||||||
|
cpu: 30m
|
||||||
|
memory: 800Mi
|
||||||
|
web_tolerations: |
|
||||||
|
- key: "dedicatedTo"
|
||||||
|
operator: "Equal"
|
||||||
|
value: "awx"
|
||||||
|
effect: "NoSchedule"
|
||||||
|
- key: "dedicatedTo"
|
||||||
|
operator: "Equal"
|
||||||
|
value: "awx-web"
|
||||||
|
effect: "NoSchedule"
|
||||||
|
web_affinity:
|
||||||
|
nodeAffinity:
|
||||||
|
requiredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
nodeSelectorTerms:
|
||||||
|
- matchExpressions:
|
||||||
|
- key: dedicatedTo
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
- awx
|
||||||
|
- awx-web
|
||||||
|
web_resource_requirements:
|
||||||
|
# Averages at about 18-150m vCPU and 1250Mi RAM when chilling unused
|
||||||
|
# Averages at about 750m vCPU and 1280Mi RAM with one user browsing
|
||||||
|
# Went as up as 1883m and 1328Mi RAM during initialization
|
||||||
|
requests:
|
||||||
|
cpu: 50m
|
||||||
|
memory: 1.25Gi
|
||||||
|
no_log: true
|
||||||
5
examples/awx/instance/db.env.example
Normal file
5
examples/awx/instance/db.env.example
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
host=awx.db.company.com
|
||||||
|
port=5432
|
||||||
|
database=awx
|
||||||
|
sslmode=prefer
|
||||||
|
type=unmanaged
|
||||||
2
examples/awx/instance/db.secret.env.example
Normal file
2
examples/awx/instance/db.secret.env.example
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
username=awxmaster
|
||||||
|
password=Evaluate9-Confiding5-Emphasize6
|
||||||
23
examples/awx/instance/kustomization.yaml
Normal file
23
examples/awx/instance/kustomization.yaml
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
|
||||||
|
namespace: awx
|
||||||
|
labels:
|
||||||
|
- includeSelectors: true
|
||||||
|
pairs:
|
||||||
|
app.kubernetes.io/managed-by: kustomize
|
||||||
|
app.kubernetes.io/part-of: awx
|
||||||
|
|
||||||
|
generatorOptions:
|
||||||
|
disableNameSuffixHash: true
|
||||||
|
|
||||||
|
secretGenerator:
|
||||||
|
- name: awx-postgres-configuration
|
||||||
|
envs:
|
||||||
|
- db.env
|
||||||
|
- db.secret.env
|
||||||
|
|
||||||
|
resources:
|
||||||
|
- awx.yaml
|
||||||
1
examples/awx/operator/.gitignore
vendored
Normal file
1
examples/awx/operator/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
/charts/
|
||||||
21
examples/awx/operator/kustomization.yaml
Normal file
21
examples/awx/operator/kustomization.yaml
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
|
||||||
|
namespace: awx
|
||||||
|
labels:
|
||||||
|
- includeSelectors: true
|
||||||
|
pairs:
|
||||||
|
app.kubernetes.io/managed-by: kustomize
|
||||||
|
app.kubernetes.io/part-of: awx
|
||||||
|
|
||||||
|
resources:
|
||||||
|
- namespace.yaml
|
||||||
|
helmCharts:
|
||||||
|
- name: awx-operator
|
||||||
|
repo: https://ansible.github.io/awx-operator/
|
||||||
|
version: 2.19.1
|
||||||
|
releaseName: awx-operator
|
||||||
|
includeCRDs: true # Important that it is true; *not* namespaced, watch out upon removal
|
||||||
|
# FIXME: set resources -> requires 10m+32Mi, leave limitless (peaked at 1880m+799Mi during init)
|
||||||
5
examples/awx/operator/namespace.yaml
Normal file
5
examples/awx/operator/namespace.yaml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: awx
|
||||||
Reference in New Issue
Block a user