hostconfig-operator/airship-host-config/deploy/operator.yaml

68 lines
1.9 KiB
YAML

---
apiVersion: apps/v1
kind: Deployment
metadata:
name: airship-host-config
spec:
replicas: 2
selector:
matchLabels:
name: airship-host-config
template:
metadata:
labels:
name: airship-host-config
spec:
serviceAccountName: airship-host-config
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: name
operator: In
values:
- airship-host-config
topologyKey: "kubernetes.io/hostname"
nodeSelector:
kubernetes.io/role: master
tolerations:
- key: node-role.kubernetes.io/master
effect: NoSchedule
containers:
- name: airship-host-config
image: "AIRSHIP_HOSTCONFIG_IMAGE"
imagePullPolicy: "PULL_POLICY"
args:
- --leader-elect
- --leader-election-id=airship-host-config
volumeMounts:
- mountPath: /tmp/ansible-operator/runner
name: runner
env:
- name: WATCH_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: ANSIBLE_FILTER_PLUGINS
value: /opt/ansible/plugins/filter
- name: ANSIBLE_FORKS
value: "100"
- name: ANSIBLE_GATHERING
value: explicit
- name: ANSIBLE_INVENTORY
value: /opt/ansible/inventory
- name: USER
value: "USERNAME"
- name: PASS
value: "PASSWORD"
- name: SECRET_NAMESPACE
value: "default"
volumes:
- name: runner
emptyDir: {}