airshipctl/manifests/function/baremetal-operator/ironic.yaml
Andrii Ostapenko 3f559c3c1e
Implements custom QCOW delivery
With this commit QCOW images are pulled as a docker image to new
qcow-bundle container within ironic pod and copy them to shared ironic
volume to be served to hosts.

Also squashed with [0], manifests are adjusted to consume new QCOWs and
old QCOW related funtionality is removed.

[0] https://review.opendev.org/c/airship/airshipctl/+/776270

Co-Authored-By: Alexey Odinokov <aodinokov@mirantis.com>
Co-Authored-By: Craig Anderson <craig.anderson@att.com>

Change-Id: I958184b34ae94206bc5e87993e9287587b6a11d9
Signed-off-by: Andrii Ostapenko <andrii.ostapenko@att.com>
2021-02-23 15:43:45 -06:00

125 lines
3.8 KiB
YAML

---
apiVersion: apps/v1
kind: Deployment
metadata:
name: ironic
spec:
replicas: 1
selector:
matchLabels:
name: ironic
template:
metadata:
labels:
name: ironic
spec:
hostNetwork: true
volumes:
- name: ironic-storage
persistentVolumeClaim:
claimName: ironic-pv-claim
- name: ironic-config-files
configMap:
name: ironic-config-files
defaultMode: 0644
- name: ironic-entrypoints
configMap:
name: ironic-entrypoints
defaultMode: 0700
- name: ironic-vars
configMap:
name: ironic-vars
defaultMode: 0644
nodeSelector: {}
initContainers:
- name: init-bootstrap
image: "centos"
imagePullPolicy: Always
command: ['/bin/init-bootstrap']
envFrom:
- configMapRef:
name: ironic-vars
volumeMounts:
- name: ironic-storage
mountPath: "/shared"
- name: ironic-entrypoints
mountPath: /bin/init-bootstrap
subPath: init-bootstrap
- name: ironic-config-files
mountPath: /cfg
- name: ironic-vars
mountPath: /ironic-vars
- name: init-images
image: quay.io/airshipit/ipa:latest
imagePullPolicy: Always
command: ['/bin/init-images']
volumeMounts:
- name: ironic-storage
mountPath: "/shared"
- name: ironic-entrypoints
mountPath: /bin/init-images
subPath: init-images
- name: qcow-bundle
command:
- sh
- -c
- "cp /qcows/*.qcow2 /qcows/*.qcow2.md5sum /shared/html/images/"
image: "quay.io/airshipit/qcow-bundle:latest-ubuntu_focal"
imagePullPolicy: Always
volumeMounts:
- mountPath: "/shared"
name: ironic-storage
containers:
- name: dnsmasq
image: "quay.io/metal3-io/ironic:latest"
imagePullPolicy: Always
command: ["/bin/rundnsmasq"]
securityContext:
privileged: true
volumeMounts:
- mountPath: "/shared"
name: ironic-storage
- name: ironic-entrypoints
mountPath: /bin/rundnsmasq
subPath: dnsmasq-entrypoint
- name: httpd
image: "quay.io/metal3-io/ironic:latest"
imagePullPolicy: Always
securityContext:
capabilities:
add: ["NET_ADMIN"]
command: ["/bin/runhttpd"]
volumeMounts:
- mountPath: "/shared"
name: ironic-storage
- name: ironic-entrypoints
mountPath: /bin/runhttpd
subPath: httpd-entrypoint
- name: ironic
image: "quay.io/metal3-io/ironic:latest"
imagePullPolicy: Always
command: ["/bin/runironic"]
securityContext:
privileged: true
volumeMounts:
- mountPath: "/shared"
name: ironic-storage
- name: ironic-entrypoints
mountPath: /bin/runironic
subPath: ironic-entrypoint
- name: ironic-inspector
image: "quay.io/metal3-io/ironic-inspector:latest"
imagePullPolicy: Always
command: ["/bin/runironic-inspector"]
envFrom:
- configMapRef:
name: ironic-vars
securityContext:
privileged: true
volumeMounts:
- mountPath: "/shared"
name: ironic-storage
- name: ironic-entrypoints
mountPath: /bin/runironic-inspector
subPath: inspector-entrypoint