mirror of
https://github.com/ansible/awx-operator.git
synced 2026-03-26 21:33:14 +00:00
* This increases security, the awx-operator SA has less cluster-wide
access
* This means one operator can only deploy to a single namespace
* If AWX deployments are needed in multiple namespaces, multiple
awx-operators can be deployed to accomplish this.
Signed-off-by: Christian M. Adams <chadams@redhat.com>
51 lines
1.4 KiB
Django/Jinja
51 lines
1.4 KiB
Django/Jinja
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: awx-operator
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
name: awx-operator
|
|
template:
|
|
metadata:
|
|
labels:
|
|
name: awx-operator
|
|
spec:
|
|
serviceAccountName: awx-operator
|
|
containers:
|
|
- name: awx-operator
|
|
image: "{{ operator_image }}:{{ operator_version }}"
|
|
imagePullPolicy: "{{ pull_policy|default('Always') }}"
|
|
volumeMounts:
|
|
- mountPath: /tmp/ansible-operator/runner
|
|
name: runner
|
|
env:
|
|
# Watch one namespace (namespace-scoped).
|
|
- name: WATCH_NAMESPACE
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: metadata.namespace
|
|
- name: POD_NAME
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: metadata.name
|
|
- name: OPERATOR_NAME
|
|
value: awx-operator
|
|
- name: ANSIBLE_GATHERING
|
|
value: explicit
|
|
- name: OPERATOR_VERSION
|
|
value: "{{ operator_version }}"
|
|
- name: ANSIBLE_DEBUG_LOGS
|
|
value: "{{ ansible_debug_logs|lower | default('false'|lower) }}"
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /healthz
|
|
port: 6789
|
|
initialDelaySeconds: 15
|
|
periodSeconds: 20
|
|
volumes:
|
|
- name: runner
|
|
emptyDir: {}
|