RabbitMQ add preStop and prep 3.8.x feature flag

This ps updates the following:
- Add preStop action to allow rabbitmq node a chance to more
  graceful shutdown
- Add support for RABBITMQ_FEATURE_FLAG in preparation for
  future 3.8.x upgrade.

Change-Id: I25d1e4fdb9dee370382e97a5a97b2b098f5ef11f
This commit is contained in:
Roy Tang 2021-07-12 14:01:43 -04:00
parent 4d2f78fee2
commit 479a1c7335
4 changed files with 17 additions and 1 deletions

View File

@ -15,6 +15,6 @@ apiVersion: v1
appVersion: v3.7.26
description: OpenStack-Helm RabbitMQ
name: rabbitmq
version: 0.1.12
version: 0.1.13
home: https://github.com/rabbitmq/rabbitmq-server
...

View File

@ -212,6 +212,10 @@ spec:
value: "{{ tuple "oslo_messaging" "internal" "amqp" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}"
- name: PORT_CLUSTERING
value: "{{ add (tuple "oslo_messaging" "internal" "amqp" . | include "helm-toolkit.endpoints.endpoint_port_lookup") 20000 }}"
{{- if ne (.Values.conf.feature_flags | default "") "default" }}
- name: RABBITMQ_FEATURE_FLAGS
value: "{{ .Values.conf.feature_flags }}"
{{- end }}
readinessProbe:
initialDelaySeconds: 10
timeoutSeconds: 10
@ -224,6 +228,12 @@ spec:
exec:
command:
- /tmp/rabbitmq-liveness.sh
lifecycle:
preStop:
exec:
command:
- rabbitmqctl
- stop_app
volumeMounts:
- name: pod-tmp
mountPath: /tmp

View File

@ -195,6 +195,11 @@ conf:
management.listener.port: null
rabbitmq_exporter:
rabbit_timeout: 30
# Feature Flags is introduced in RabbitMQ 3.8.0
# To deploy with standard list of feature, leave as default
# To deploy with specific feature, separate each feature with comma
# To deploy with all features disabled, leave blank or empty
feature_flags: default
dependencies:
dynamic:
common:

View File

@ -12,4 +12,5 @@ rabbitmq:
- 0.1.10 Set separate for HTTPS
- 0.1.11 Add TLS support for helm test
- 0.1.12 Added helm hook post-install and post-upgrade for rabbitmq wait cluster job
- 0.1.13 Add prestop action and version 3.8.x upgrade prep
...