Revert "Revert "oran-shell-release: release image for F""
[pti/rtp.git] / meta-starlingx / meta-stx-flock / stx-openstack-armada-app / openstack-helm / 0005-Nova-Add-support-for-disabling-Readiness-Liveness-pr.patch
1 From af94c98eee44769a2c1e8f211029f8346a13ebc2 Mon Sep 17 00:00:00 2001
2 From: Robert Church <robert.church@windriver.com>
3 Date: Fri, 22 Mar 2019 03:42:08 -0400
4 Subject: [PATCH 05] Nova: Add support for disabling Readiness/Liveness
5  probes
6
7 With the introduction of Readiness/Liveness probes in
8 Ib8e4b93486588320fd2d562c3bc90b65844e52e5, some probes are failing and
9 preventing successful armada manifest applies.
10
11 Add support to disable the probes.
12
13 Change-Id: Iebe7327055f58fa78ce3fcac968c1fa617c30c2f
14 Signed-off-by: Robert Church <robert.church@windriver.com>
15 ---
16  nova/templates/daemonset-compute.yaml      |  4 ++++
17  nova/templates/deployment-conductor.yaml   |  4 ++++
18  nova/templates/deployment-consoleauth.yaml |  4 ++++
19  nova/templates/deployment-novncproxy.yaml  |  4 ++++
20  nova/templates/deployment-scheduler.yaml   |  4 ++++
21  nova/templates/deployment-spiceproxy.yaml  |  4 ++++
22  nova/values.yaml                           | 28 ++++++++++++++++++++++++++++
23  7 files changed, 52 insertions(+)
24
25 diff --git a/nova/templates/daemonset-compute.yaml b/nova/templates/daemonset-compute.yaml
26 index feea6ab..86dc2b9 100644
27 --- a/nova/templates/daemonset-compute.yaml
28 +++ b/nova/templates/daemonset-compute.yaml
29 @@ -190,6 +190,7 @@ spec:
30              - name: LIBVIRT_CEPH_SECRET_UUID
31                value: "{{ .Values.conf.ceph.secret_uuid }}"
32            {{ end }}
33 +          {{- if .Values.pod.probes.readiness.nova_compute.enabled }}
34            readinessProbe:
35              exec:
36                command:
37 @@ -202,6 +203,8 @@ spec:
38              initialDelaySeconds: 80
39              periodSeconds: 90
40              timeoutSeconds: 70
41 +          {{- end }}
42 +          {{- if .Values.pod.probes.liveness.nova_compute.enabled }}
43            livenessProbe:
44              exec:
45                command:
46 @@ -215,6 +218,7 @@ spec:
47              initialDelaySeconds: 120
48              periodSeconds: 90
49              timeoutSeconds: 70
50 +          {{- end }}
51            command:
52              - /tmp/nova-compute.sh
53            volumeMounts:
54 diff --git a/nova/templates/deployment-conductor.yaml b/nova/templates/deployment-conductor.yaml
55 index f927afa..0caa006 100644
56 --- a/nova/templates/deployment-conductor.yaml
57 +++ b/nova/templates/deployment-conductor.yaml
58 @@ -59,6 +59,7 @@ spec:
59  {{ tuple $envAll "nova_conductor" | include "helm-toolkit.snippets.image" | indent 10 }}
60  {{ tuple $envAll $envAll.Values.pod.resources.conductor | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
61  {{ dict "envAll" $envAll "application" "nova" "container" "nova_conductor" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }}
62 +          {{- if .Values.pod.probes.readiness.nova_conductor.enabled }}
63            readinessProbe:
64              exec:
65                command:
66 @@ -71,6 +72,8 @@ spec:
67              initialDelaySeconds: 80
68              periodSeconds: 90
69              timeoutSeconds: 70
70 +          {{- end }}
71 +          {{- if .Values.pod.probes.liveness.nova_conductor.enabled }}
72            livenessProbe:
73              exec:
74                command:
75 @@ -84,6 +87,7 @@ spec:
76              initialDelaySeconds: 120
77              periodSeconds: 90
78              timeoutSeconds: 70
79 +          {{- end }}
80            command:
81              - /tmp/nova-conductor.sh
82            volumeMounts:
83 diff --git a/nova/templates/deployment-consoleauth.yaml b/nova/templates/deployment-consoleauth.yaml
84 index b9cb717..0f590e0 100644
85 --- a/nova/templates/deployment-consoleauth.yaml
86 +++ b/nova/templates/deployment-consoleauth.yaml
87 @@ -59,6 +59,7 @@ spec:
88  {{ tuple $envAll "nova_consoleauth" | include "helm-toolkit.snippets.image" | indent 10 }}
89  {{ tuple $envAll $envAll.Values.pod.resources.consoleauth | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
90  {{ dict "envAll" $envAll "application" "nova" "container" "nova_consoleauth" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }}
91 +          {{- if .Values.pod.probes.readiness.nova_consoleauth.enabled }}
92            readinessProbe:
93              exec:
94                command:
95 @@ -71,6 +72,8 @@ spec:
96              initialDelaySeconds: 80
97              periodSeconds: 90
98              timeoutSeconds: 70
99 +          {{- end }}
100 +          {{- if .Values.pod.probes.liveness.nova_consoleauth.enabled }}
101            livenessProbe:
102              exec:
103                command:
104 @@ -84,6 +87,7 @@ spec:
105              initialDelaySeconds: 120
106              periodSeconds: 90
107              timeoutSeconds: 70
108 +          {{- end }}
109            command:
110              - /tmp/nova-consoleauth.sh
111            volumeMounts:
112 diff --git a/nova/templates/deployment-novncproxy.yaml b/nova/templates/deployment-novncproxy.yaml
113 index 42a52af..495c1ac 100644
114 --- a/nova/templates/deployment-novncproxy.yaml
115 +++ b/nova/templates/deployment-novncproxy.yaml
116 @@ -103,14 +103,18 @@ spec:
117  {{ tuple $envAll "nova_novncproxy" | include "helm-toolkit.snippets.image" | indent 10 }}
118  {{ tuple $envAll $envAll.Values.pod.resources.novncproxy | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
119  {{ dict "envAll" $envAll "application" "nova" "container" "nova_novncproxy" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }}
120 +          {{- if .Values.pod.probes.readiness.nova_novcnproxy.enabled }}
121            readinessProbe:
122              tcpSocket:
123                port: {{ tuple "compute_novnc_proxy" "internal" "novnc_proxy" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
124              initialDelaySeconds: 30
125 +          {{- end }}
126 +          {{- if .Values.pod.probes.liveness.nova_novcnproxy.enabled }}
127            livenessProbe:
128              tcpSocket:
129                port: {{ tuple "compute_novnc_proxy" "internal" "novnc_proxy" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
130              initialDelaySeconds: 30
131 +          {{- end }}
132            command:
133              - /tmp/nova-console-proxy.sh
134            ports:
135 diff --git a/nova/templates/deployment-scheduler.yaml b/nova/templates/deployment-scheduler.yaml
136 index 05ee949..9a30fa6 100644
137 --- a/nova/templates/deployment-scheduler.yaml
138 +++ b/nova/templates/deployment-scheduler.yaml
139 @@ -59,6 +59,7 @@ spec:
140  {{ tuple $envAll "nova_scheduler" | include "helm-toolkit.snippets.image" | indent 10 }}
141  {{ tuple $envAll $envAll.Values.pod.resources.scheduler | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
142  {{ dict "envAll" $envAll "application" "nova" "container" "nova_scheduler" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }}
143 +          {{- if .Values.pod.probes.readiness.nova_scheduler.enabled }}
144            readinessProbe:
145              exec:
146                command:
147 @@ -72,6 +73,8 @@ spec:
148              initialDelaySeconds: 80
149              periodSeconds: 90
150              timeoutSeconds: 70
151 +          {{- end }}
152 +          {{- if .Values.pod.probes.liveness.nova_scheduler.enabled }}
153            livenessProbe:
154              exec:
155                command:
156 @@ -86,6 +89,7 @@ spec:
157              initialDelaySeconds: 120
158              periodSeconds: 90
159              timeoutSeconds: 70
160 +          {{- end }}
161            command:
162              - /tmp/nova-scheduler.sh
163            volumeMounts:
164 diff --git a/nova/templates/deployment-spiceproxy.yaml b/nova/templates/deployment-spiceproxy.yaml
165 index a221656..038c85c 100644
166 --- a/nova/templates/deployment-spiceproxy.yaml
167 +++ b/nova/templates/deployment-spiceproxy.yaml
168 @@ -101,14 +101,18 @@ spec:
169  {{ tuple $envAll "nova_spiceproxy" | include "helm-toolkit.snippets.image" | indent 10 }}
170  {{ tuple $envAll $envAll.Values.pod.resources.spiceproxy | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
171  {{ dict "envAll" $envAll "application" "nova" "container" "nova_spiceproxy" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }}
172 +          {{- if .Values.pod.probes.readiness.nova_spiceproxy.enabled }}
173            readinessProbe:
174              tcpSocket:
175                port: {{ tuple "compute_spice_proxy" "internal" "spice_proxy" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
176              initialDelaySeconds: 30
177 +          {{- end }}
178 +          {{- if .Values.pod.probes.liveness.nova_spiceproxy.enabled }}
179            livenessProbe:
180              tcpSocket:
181                port: {{ tuple "compute_spice_proxy" "internal" "spice_proxy" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
182              initialDelaySeconds: 30
183 +          {{- end }}
184            command:
185              - /tmp/nova-console-proxy.sh
186            ports:
187 diff --git a/nova/values.yaml b/nova/values.yaml
188 index 97ef1b5..4092329 100644
189 --- a/nova/values.yaml
190 +++ b/nova/values.yaml
191 @@ -2499,6 +2499,34 @@ pod:
192          limits:
193            memory: "1024Mi"
194            cpu: "2000m"
195 +  probes:
196 +    readiness:
197 +      nova_compute:
198 +        enabled: true
199 +      nova_conductor:
200 +        enabled: true
201 +      nova_consoleauth:
202 +        enabled: true
203 +      nova_novcnproxy:
204 +        enabled: true
205 +      nova_scheduler:
206 +        enabled: true
207 +      nova_spiceproxy:
208 +        enabled: true
209 +    liveness:
210 +      nova_compute:
211 +        enabled: true
212 +      nova_conductor:
213 +        enabled: true
214 +      nova_consoleauth:
215 +        enabled: true
216 +      nova_novcnproxy:
217 +        enabled: true
218 +      nova_scheduler:
219 +        enabled: true
220 +      nova_spiceproxy:
221 +        enabled: true
222 +
223  network_policy:
224    nova:
225      # TODO(lamt): Need to tighten this ingress for security.
226 -- 
227 2.7.4
228