-
Notifications
You must be signed in to change notification settings - Fork 267
/
Copy pathironic.yaml
176 lines (176 loc) · 5.01 KB
/
ironic.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
apiVersion: apps/v1
kind: Deployment
metadata:
name: ironic
spec:
replicas: 1
minReadySeconds: 10
strategy:
# We cannot run Ironic with more than one replica at a time. The recreate
# strategy makes sure that the old pod is gone before a new is started.
type: Recreate
selector:
matchLabels:
name: ironic
template:
metadata:
labels:
name: ironic
spec:
hostNetwork: true
containers:
- name: ironic-dnsmasq
image: quay.io/metal3-io/ironic
imagePullPolicy: Always
securityContext:
# Must be true so dnsmasq may get the capabilities via file caps
# KEP: https://github.com/kubernetes/enhancements/blob/master/keps/sig-security/2763-ambient-capabilities/README.md
allowPrivilegeEscalation: true
capabilities:
drop:
- ALL
add:
- NET_ADMIN
- NET_BIND_SERVICE
- NET_RAW
privileged: false
runAsUser: 997 # ironic
runAsGroup: 994 # ironic
command:
- /bin/rundnsmasq
livenessProbe:
exec:
command: ["sh", "-c", "ss -lun | grep :67 && ss -lun | grep :69"]
initialDelaySeconds: 30
periodSeconds: 30
timeoutSeconds: 10
successThreshold: 1
failureThreshold: 10
readinessProbe:
exec:
command: ["sh", "-c", "ss -lun | grep :67 && ss -lun | grep :69"]
initialDelaySeconds: 30
periodSeconds: 30
timeoutSeconds: 10
successThreshold: 1
failureThreshold: 10
volumeMounts:
- mountPath: /shared
name: ironic-data-volume
envFrom:
- configMapRef:
name: ironic-bmo-configmap
- name: ironic
image: quay.io/metal3-io/ironic
imagePullPolicy: Always
command:
- /bin/runironic
livenessProbe:
exec:
command: ["/bin/ironic-liveness"]
initialDelaySeconds: 30
periodSeconds: 30
timeoutSeconds: 10
successThreshold: 1
failureThreshold: 10
readinessProbe:
exec:
command: ["/bin/ironic-readiness"]
initialDelaySeconds: 30
periodSeconds: 30
timeoutSeconds: 10
successThreshold: 1
failureThreshold: 10
volumeMounts:
- mountPath: /shared
name: ironic-data-volume
envFrom:
- configMapRef:
name: ironic-bmo-configmap
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
privileged: false
runAsUser: 997 # ironic
runAsGroup: 994 # ironic
- name: ironic-log-watch
image: quay.io/metal3-io/ironic
imagePullPolicy: Always
command:
- /bin/runlogwatch.sh
volumeMounts:
- mountPath: /shared
name: ironic-data-volume
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
privileged: false
runAsUser: 997 # ironic
runAsGroup: 994 # ironic
- name: ironic-httpd
image: quay.io/metal3-io/ironic
imagePullPolicy: Always
command:
- /bin/runhttpd
livenessProbe:
exec:
command: ["sh", "-c", "curl -sSfk http://127.0.0.1:6180/images"]
initialDelaySeconds: 30
periodSeconds: 30
timeoutSeconds: 10
successThreshold: 1
failureThreshold: 10
readinessProbe:
exec:
command: ["sh", "-c", "curl -sSfk http://127.0.0.1:6180/images"]
initialDelaySeconds: 30
periodSeconds: 30
timeoutSeconds: 10
successThreshold: 1
failureThreshold: 10
volumeMounts:
- mountPath: /shared
name: ironic-data-volume
envFrom:
- configMapRef:
name: ironic-bmo-configmap
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
privileged: false
runAsUser: 997 # ironic
runAsGroup: 994 # ironic
initContainers:
- name: ironic-ipa-downloader
image: quay.io/metal3-io/ironic-ipa-downloader
imagePullPolicy: Always
command:
- /usr/local/bin/get-resource.sh
envFrom:
- configMapRef:
name: ironic-bmo-configmap
volumeMounts:
- mountPath: /shared
name: ironic-data-volume
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
privileged: false
runAsUser: 997 # ironic
runAsGroup: 994 # ironic
volumes:
- name: ironic-data-volume
emptyDir: {}
securityContext:
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
fsGroup: 994