update the committers for icn
[icn.git] / deploy / ironic / base / ironic / ironic.yaml
1 apiVersion: apps/v1
2 kind: Deployment
3 metadata:
4   name: capm3-ironic
5 spec:
6   replicas: 1
7   strategy:
8     # We cannot run Ironic with more than one replica at a time. The recreate
9     # strategy makes sure that the old pod is gone before a new is started.
10     type: Recreate
11   selector:
12     matchLabels:
13       name: capm3-ironic
14   template:
15     metadata:
16       labels:
17         name: capm3-ironic
18     spec:
19       hostNetwork: true
20       containers:
21         - name: ironic-dnsmasq
22           image: quay.io/metal3-io/ironic
23           imagePullPolicy: Always
24           securityContext:
25              capabilities:
26                add: ["NET_ADMIN"]
27           command:
28             - /bin/rundnsmasq
29           livenessProbe:
30            exec:
31              command: ["sh", "-c", "ss -lun | grep :67 && ss -lun | grep :69"]
32            initialDelaySeconds: 30
33            periodSeconds: 30
34            timeoutSeconds: 10
35            successThreshold: 1
36            failureThreshold: 10
37           readinessProbe:
38            exec:
39              command: ["sh", "-c", "ss -lun | grep :67 && ss -lun | grep :69"]
40            initialDelaySeconds: 30
41            periodSeconds: 30
42            timeoutSeconds: 10
43            successThreshold: 1
44            failureThreshold: 10
45           volumeMounts:
46             - mountPath: /shared
47               name: ironic-data-volume
48           envFrom:
49             - configMapRef:
50                 name: ironic-bmo-configmap
51         - name: mariadb
52           image: quay.io/metal3-io/mariadb
53           imagePullPolicy: Always
54           livenessProbe:
55            exec:
56              command: ["sh", "-c", "mysqladmin status -uironic -p$(printenv MARIADB_PASSWORD)"]
57            initialDelaySeconds: 30
58            periodSeconds: 30
59            timeoutSeconds: 10
60            successThreshold: 1
61            failureThreshold: 10
62           readinessProbe:
63            exec:
64              command: ["sh", "-c", "mysqladmin status -uironic -p$(printenv MARIADB_PASSWORD)"]
65            initialDelaySeconds: 30
66            periodSeconds: 30
67            timeoutSeconds: 10
68            successThreshold: 1
69            failureThreshold: 10
70           volumeMounts:
71             - mountPath: /shared
72               name: ironic-data-volume
73           env:
74             - name: MARIADB_PASSWORD
75               valueFrom:
76                 secretKeyRef:
77                   name: mariadb-password
78                   key: password
79             - name: RESTART_CONTAINER_CERTIFICATE_UPDATED
80               valueFrom:
81                  configMapKeyRef:
82                   name: ironic-bmo-configmap
83                   key: RESTART_CONTAINER_CERTIFICATE_UPDATED
84         - name: ironic-api
85           image: quay.io/metal3-io/ironic
86           imagePullPolicy: Always
87           command:
88             - /bin/runironic-api
89           livenessProbe:
90            exec:
91              command: ["sh", "-c", "curl -sSf http://127.0.0.1:6385 || curl -sSfk https://127.0.0.1:6385"]
92            initialDelaySeconds: 30
93            periodSeconds: 30
94            timeoutSeconds: 10
95            successThreshold: 1
96            failureThreshold: 10
97           readinessProbe:
98            exec:
99              command: ["sh", "-c", "curl -sSf http://127.0.0.1:6385 || curl -sSfk https://127.0.0.1:6385"]
100            initialDelaySeconds: 30
101            periodSeconds: 30
102            timeoutSeconds: 10
103            successThreshold: 1
104            failureThreshold: 10
105           volumeMounts:
106             - mountPath: /shared
107               name: ironic-data-volume
108           envFrom:
109             - configMapRef:
110                 name: ironic-bmo-configmap
111           env:
112             - name: MARIADB_PASSWORD
113               valueFrom:
114                 secretKeyRef:
115                   name: mariadb-password
116                   key: password
117         - name: ironic-conductor
118           image: quay.io/metal3-io/ironic
119           imagePullPolicy: Always
120           command:
121             - /bin/runironic-conductor
122           readinessProbe:
123             exec:
124               command: ["sh", "-c", "curl -sd '{}' -o – -k https://127.0.0.1:8089 || curl -sd '{}' -o – http://127.0.0.1:8089"]
125             initialDelaySeconds: 30
126             periodSeconds: 30
127             timeoutSeconds: 10
128             successThreshold: 1
129             failureThreshold: 10
130           livenessProbe:
131             exec:
132               command: ["sh", "-c", "curl -sd '{}' -o – -k https://127.0.0.1:8089 || curl -sd '{}' -o – http://127.0.0.1:8089"]
133             initialDelaySeconds: 30
134             periodSeconds: 30
135             timeoutSeconds: 10
136             successThreshold: 1
137             failureThreshold: 10
138           volumeMounts:
139             - mountPath: /shared
140               name: ironic-data-volume
141           envFrom:
142             - configMapRef:
143                 name: ironic-bmo-configmap
144           env:
145             - name: MARIADB_PASSWORD
146               valueFrom:
147                 secretKeyRef:
148                   name: mariadb-password
149                   key: password
150         - name: ironic-log-watch
151           image: quay.io/metal3-io/ironic
152           imagePullPolicy: Always
153           command:
154             - /bin/runlogwatch.sh
155           volumeMounts:
156             - mountPath: /shared
157               name: ironic-data-volume
158         - name: ironic-inspector
159           image: quay.io/metal3-io/ironic
160           imagePullPolicy: Always
161           readinessProbe:
162             exec:
163               command: ["sh", "-c", "curl -sSf http://127.0.0.1:5050 || curl -sSf -k https://127.0.0.1:5050"]
164             initialDelaySeconds: 30
165             periodSeconds: 30
166             timeoutSeconds: 10
167             successThreshold: 1
168             failureThreshold: 10
169           livenessProbe:
170             exec:
171               command: ["sh", "-c", "curl -sSf http://127.0.0.1:5050 || curl -sSf -k https://127.0.0.1:5050"]
172             initialDelaySeconds: 30
173             periodSeconds: 30
174             timeoutSeconds: 10
175             successThreshold: 1
176             failureThreshold: 10
177           command:
178             - /bin/runironic-inspector
179           envFrom:
180             - configMapRef:
181                 name: ironic-bmo-configmap
182       initContainers:
183         - name: ironic-ipa-downloader
184           image: quay.io/metal3-io/ironic-ipa-downloader
185           imagePullPolicy: Always
186           command:
187             - /usr/local/bin/get-resource.sh
188           envFrom:
189             - configMapRef:
190                 name: ironic-bmo-configmap
191           volumeMounts:
192             - mountPath: /shared
193               name: ironic-data-volume
194       volumes:
195         - name: ironic-data-volume
196           emptyDir: {}