Update rabbitmq chart to enable probe overrides

Add variables for initial delay, period and timeout for rabbitmq
liveness and readiness probes.  Default to current upstream settings.

Do not recommend this for upstreaming to openstack-helm-infra as
enhancements have been added since the last starlingx rebase to enable
more generic override of probes.  On next rebase of starlingx on
openstack-helm-infra, recommend refactoring this change based on these
upstream commits (assuming upstream hasn't done it already):
https://review.opendev.org/#/c/668710/
https://review.opendev.org/#/c/631597/

Partial-Bug: 1837426
Change-Id: I0a8d8f466c4b8482cc9161d28de37bff6fc7ced3
Signed-off-by: Gerry Kopec <gerry.kopec@windriver.com>
(cherry picked from commit f84470ad08)
This commit is contained in:
Gerry Kopec 2019-08-16 14:51:07 -04:00 committed by Al Bailey
parent 5942005fde
commit 138a38449a
3 changed files with 66 additions and 1 deletions

View File

@ -5,4 +5,4 @@ TAR="$TAR_NAME-$SHA.tar.gz"
COPY_LIST="${CGCS_BASE}/downloads/$TAR $PKG_BASE/files/*"
TIS_PATCH_VER=13
TIS_PATCH_VER=14

View File

@ -23,6 +23,7 @@ Patch05: 0005-Add-a-configmap-for-ingress-controller-config.patch
Patch06: 0006-Add-TLS-support-for-Gnocchi-public-endpoint.patch
Patch07: 0007-Fix-pod-restarts-on-all-workers-when-worker-added-re.patch
Patch08: 0008-Add-io_thread_pool-for-rabbitmq.patch
Patch09: 0009-Enable-override-of-rabbitmq-probe-parameters.patch
BuildRequires: helm
@ -39,6 +40,7 @@ Openstack Helm Infra charts
%patch06 -p1
%patch07 -p1
%patch08 -p1
%patch09 -p1
%build
# initialize helm and build the toolkit

View File

@ -0,0 +1,63 @@
From 132df9829fa4c697e0b9701871888708973f9123 Mon Sep 17 00:00:00 2001
From: Gerry Kopec <Gerry.Kopec@windriver.com>
Date: Fri, 16 Aug 2019 14:29:46 -0400
Subject: [PATCH] Enable override of rabbitmq probe parameters
Add variables for initial delay, period and timeout for rabbitmq
liveness and readiness probes.
Change-Id: I8d2685118eb4ce3b8c27952892f7ad553fc5de77
Signed-off-by: Gerry Kopec <Gerry.Kopec@windriver.com>
---
rabbitmq/templates/statefulset.yaml | 10 ++++++----
rabbitmq/values.yaml | 9 +++++++++
2 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/rabbitmq/templates/statefulset.yaml b/rabbitmq/templates/statefulset.yaml
index afe5520..7b57c64 100644
--- a/rabbitmq/templates/statefulset.yaml
+++ b/rabbitmq/templates/statefulset.yaml
@@ -199,14 +199,16 @@ spec:
value: {{ $envAll.Values.io_thread_pool.size | quote }}
{{- end }}
readinessProbe:
- initialDelaySeconds: 10
- timeoutSeconds: 10
+ initialDelaySeconds: {{ $envAll.Values.pod.probes.readiness.initialDelaySeconds }}
+ periodSeconds: {{ $envAll.Values.pod.probes.readiness.periodSeconds }}
+ timeoutSeconds: {{ $envAll.Values.pod.probes.readiness.timeoutSeconds }}
exec:
command:
- /tmp/rabbitmq-readiness.sh
livenessProbe:
- initialDelaySeconds: 30
- timeoutSeconds: 10
+ initialDelaySeconds: {{ $envAll.Values.pod.probes.liveness.initialDelaySeconds }}
+ periodSeconds: {{ $envAll.Values.pod.probes.liveness.periodSeconds }}
+ timeoutSeconds: {{ $envAll.Values.pod.probes.liveness.timeoutSeconds }}
exec:
command:
- /tmp/rabbitmq-liveness.sh
diff --git a/rabbitmq/values.yaml b/rabbitmq/values.yaml
index 367058e..cfd151c 100644
--- a/rabbitmq/values.yaml
+++ b/rabbitmq/values.yaml
@@ -102,6 +102,15 @@ pod:
limits:
memory: "1024Mi"
cpu: "2000m"
+ probes:
+ readiness:
+ initialDelaySeconds: 10
+ periodSeconds: 10
+ timeoutSeconds: 10
+ liveness:
+ initialDelaySeconds: 30
+ periodSeconds: 10
+ timeoutSeconds: 10
conf:
enabled_plugins:
--
1.8.3.1