openstack-armada-app/openstack-helm/files/0008-Neutron-Add-support-fo...

225 lines
7.7 KiB
Diff

From 615b86e8f394f1648e5c2383364cd46230290182 Mon Sep 17 00:00:00 2001
From: Robert Church <robert.church@windriver.com>
Date: Fri, 22 Mar 2019 03:37:05 -0400
Subject: [PATCH 08/11] Neutron: Add support for disabling Readiness/Liveness
probes
With the introduction of Readiness/Liveness probes in
Ib99ceaabbad1d1e0faf34cc74314da9aa688fa0a, some probes are failing and
preventing successful armada manifest applies.
Add support to disable the probes.
Change-Id: I61379a5e00de4311c02c3f64cbe7c7345a9b3569
Signed-off-by: Robert Church <robert.church@windriver.com>
---
neutron/templates/daemonset-dhcp-agent.yaml | 4 ++++
neutron/templates/daemonset-l3-agent.yaml | 4 ++++
neutron/templates/daemonset-lb-agent.yaml | 4 ++++
neutron/templates/daemonset-metadata-agent.yaml | 4 ++++
neutron/templates/daemonset-ovs-agent.yaml | 4 ++++
neutron/templates/daemonset-sriov-agent.yaml | 4 ++++
neutron/values.yaml | 27 +++++++++++++++++++++++++
7 files changed, 51 insertions(+)
diff --git a/neutron/templates/daemonset-dhcp-agent.yaml b/neutron/templates/daemonset-dhcp-agent.yaml
index 49866f2a..6e1d2928 100644
--- a/neutron/templates/daemonset-dhcp-agent.yaml
+++ b/neutron/templates/daemonset-dhcp-agent.yaml
@@ -66,6 +66,7 @@ spec:
{{ tuple $envAll $envAll.Values.pod.resources.agent.dhcp | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
securityContext:
privileged: true
+ {{- if .Values.pod.probes.readiness.dhcp_agent.enabled }}
readinessProbe:
exec:
command:
@@ -80,6 +81,8 @@ spec:
initialDelaySeconds: 30
periodSeconds: 15
timeoutSeconds: 65
+ {{- end }}
+ {{- if .Values.pod.probes.liveness.dhcp_agent.enabled }}
livenessProbe:
exec:
command:
@@ -95,6 +98,7 @@ spec:
initialDelaySeconds: 120
periodSeconds: 90
timeoutSeconds: 70
+ {{- end }}
command:
- /tmp/neutron-dhcp-agent.sh
volumeMounts:
diff --git a/neutron/templates/daemonset-l3-agent.yaml b/neutron/templates/daemonset-l3-agent.yaml
index 5e0ec194..29e0f3f7 100644
--- a/neutron/templates/daemonset-l3-agent.yaml
+++ b/neutron/templates/daemonset-l3-agent.yaml
@@ -66,6 +66,7 @@ spec:
{{ tuple $envAll $envAll.Values.pod.resources.agent.l3 | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
securityContext:
privileged: true
+ {{- if .Values.pod.probes.readiness.l3_agent.enabled }}
readinessProbe:
exec:
command:
@@ -80,6 +81,8 @@ spec:
initialDelaySeconds: 30
periodSeconds: 15
timeoutSeconds: 65
+ {{- end }}
+ {{- if .Values.pod.probes.liveness.l3_agent.enabled }}
livenessProbe:
exec:
command:
@@ -95,6 +98,7 @@ spec:
initialDelaySeconds: 120
periodSeconds: 90
timeoutSeconds: 70
+ {{- end }}
command:
- /tmp/neutron-l3-agent.sh
volumeMounts:
diff --git a/neutron/templates/daemonset-lb-agent.yaml b/neutron/templates/daemonset-lb-agent.yaml
index c2b432f7..685893d5 100644
--- a/neutron/templates/daemonset-lb-agent.yaml
+++ b/neutron/templates/daemonset-lb-agent.yaml
@@ -140,12 +140,16 @@ spec:
privileged: true
command:
- /tmp/neutron-linuxbridge-agent.sh
+ {{- if .Values.pod.probes.readiness.lb_agent.enabled }}
readinessProbe:
exec:
command:
- bash
- -c
- 'brctl show'
+ {{- end }}
+ {{- if .Values.pod.probes.liveness.lb_agent.enabled }}
+ {{- end }}
volumeMounts:
- name: neutron-bin
mountPath: /tmp/neutron-linuxbridge-agent.sh
diff --git a/neutron/templates/daemonset-metadata-agent.yaml b/neutron/templates/daemonset-metadata-agent.yaml
index 8e92a675..fba132ed 100644
--- a/neutron/templates/daemonset-metadata-agent.yaml
+++ b/neutron/templates/daemonset-metadata-agent.yaml
@@ -87,6 +87,7 @@ spec:
{{ tuple $envAll $envAll.Values.pod.resources.agent.metadata | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
securityContext:
privileged: true
+ {{- if .Values.pod.probes.readiness.metadata_agent.enabled }}
readinessProbe:
exec:
command:
@@ -99,6 +100,8 @@ spec:
initialDelaySeconds: 30
periodSeconds: 15
timeoutSeconds: 35
+ {{- end }}
+ {{- if .Values.pod.probes.liveness.metadata_agent.enabled }}
livenessProbe:
exec:
command:
@@ -112,6 +115,7 @@ spec:
initialDelaySeconds: 90
periodSeconds: 60
timeoutSeconds: 45
+ {{- end }}
command:
- /tmp/neutron-metadata-agent.sh
volumeMounts:
diff --git a/neutron/templates/daemonset-ovs-agent.yaml b/neutron/templates/daemonset-ovs-agent.yaml
index 56061e63..69ee1c2c 100644
--- a/neutron/templates/daemonset-ovs-agent.yaml
+++ b/neutron/templates/daemonset-ovs-agent.yaml
@@ -154,6 +154,7 @@ spec:
privileged: true
command:
- /tmp/neutron-openvswitch-agent.sh
+ {{- if .Values.pod.probes.readiness.ovs_agent.enabled }}
# ensures this container can can see a br-int
# bridge before its marked as ready
readinessProbe:
@@ -162,6 +163,8 @@ spec:
- bash
- -c
- 'ovs-vsctl list-br | grep -q br-int'
+ {{- end }}
+ {{- if .Values.pod.probes.liveness.ovs_agent.enabled }}
livenessProbe:
exec:
command:
@@ -177,6 +180,7 @@ spec:
initialDelaySeconds: 120
periodSeconds: 90
timeoutSeconds: 70
+ {{- end }}
volumeMounts:
- name: neutron-bin
mountPath: /tmp/neutron-openvswitch-agent.sh
diff --git a/neutron/templates/daemonset-sriov-agent.yaml b/neutron/templates/daemonset-sriov-agent.yaml
index a59e4100..c03b3668 100644
--- a/neutron/templates/daemonset-sriov-agent.yaml
+++ b/neutron/templates/daemonset-sriov-agent.yaml
@@ -129,6 +129,7 @@ spec:
privileged: true
command:
- /tmp/neutron-sriov-agent.sh
+ {{- if .Values.pod.probes.readiness.sriov_agent.enabled }}
readinessProbe:
exec:
command:
@@ -141,6 +142,9 @@ spec:
initialDelaySeconds: 30
periodSeconds: 15
timeoutSeconds: 10
+ {{- end }}
+ {{- if .Values.pod.probes.liveness.sriov_agent.enabled }}
+ {{- end }}
volumeMounts:
- name: neutron-bin
mountPath: /tmp/neutron-sriov-agent.sh
diff --git a/neutron/values.yaml b/neutron/values.yaml
index 5ab4ca12..1cc67b94 100644
--- a/neutron/values.yaml
+++ b/neutron/values.yaml
@@ -520,6 +520,33 @@ pod:
limits:
memory: "1024Mi"
cpu: "2000m"
+ probes:
+ readiness:
+ dhcp_agent:
+ enabled: true
+ l3_agent:
+ enabled: true
+ lb_agent:
+ enabled: true
+ metadata_agent:
+ enabled: true
+ ovs_agent:
+ enabled: true
+ sriov_agent:
+ enabled: true
+ liveness:
+ dhcp_agent:
+ enabled: true
+ l3_agent:
+ enabled: true
+ lb_agent:
+ enabled: true
+ metadata_agent:
+ enabled: true
+ ovs_agent:
+ enabled: true
+ sriov_agent:
+ enabled: true
conf:
rally_tests:
--
2.16.5