mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
[stable/rabbitmq] Allow specifying ulimit and update healthchecks to avoid high CPU usage (#8140)
* [stable/rabbitmq] Allow specifying ulimit and update healthchecks to avoid high CPU usage Signed-off-by: tompizmor <tompizmor@gmail.com> * Fix comments on values yaml files Signed-off-by: tompizmor <tompizmor@gmail.com>
This commit is contained in:
committed by
k8s-ci-robot
parent
01b71adef1
commit
9ede978274
@@ -1,5 +1,5 @@
|
||||
name: rabbitmq
|
||||
version: 3.2.1
|
||||
version: 3.3.0
|
||||
appVersion: 3.7.8
|
||||
description: Open source message broker software that implements the Advanced Message Queuing Protocol (AMQP)
|
||||
keywords:
|
||||
|
||||
@@ -60,6 +60,7 @@ The following table lists the configurable parameters of the RabbitMQ chart and
|
||||
| `rabbitmq.nodePort` | Node port override, if serviceType NodePort | _random avaliable between 30000-32767_ |
|
||||
| `rabbitmq.managerPort` | RabbitMQ Manager port | `15672` |
|
||||
| `rabbitmq.diskFreeLimit` | Disk free limit | `"6GiB"` |
|
||||
| `rabbitmq.ulimitNofiles` | Max File Descriptor limit | `65536` |
|
||||
| `rabbitmq.plugins` | configuration file for plugins to enable | `[rabbitmq_management,rabbitmq_peer_discovery_k8s].` |
|
||||
| `rabbitmq.configuration` | rabbitmq.conf content | see values.yaml |
|
||||
| `serviceType` | Kubernetes Service type | `ClusterIP` |
|
||||
|
||||
@@ -59,12 +59,11 @@ spec:
|
||||
echo $RABBITMQ_ERL_COOKIE > /opt/bitnami/rabbitmq/var/lib/rabbitmq/.erlang.cookie
|
||||
cp /opt/bitnami/rabbitmq/var/lib/rabbitmq/.erlang.cookie /opt/bitnami/rabbitmq/.rabbitmq/
|
||||
#change permission so only the user has access to the cookie file
|
||||
chmod 600 /opt/bitnami/rabbitmq/.rabbitmq/.erlang.cookie
|
||||
chmod 600 /opt/bitnami/rabbitmq/var/lib/rabbitmq/.erlang.cookie
|
||||
|
||||
chmod 600 /opt/bitnami/rabbitmq/.rabbitmq/.erlang.cookie /opt/bitnami/rabbitmq/var/lib/rabbitmq/.erlang.cookie
|
||||
#copy the mounted configuration to both places
|
||||
cp /opt/bitnami/rabbitmq/conf/* /opt/bitnami/rabbitmq/etc/rabbitmq
|
||||
|
||||
# Apply resources limits
|
||||
ulimit -n "${RABBITMQ_ULIMIT_NOFILES}"
|
||||
#replace the default password that is generated
|
||||
sed -i "s/CHANGEME/$RABBITMQ_PASSWORD/g" /opt/bitnami/rabbitmq/etc/rabbitmq/rabbitmq.conf
|
||||
exec rabbitmq-server
|
||||
@@ -89,9 +88,7 @@ spec:
|
||||
{{- if .Values.livenessProbe.enabled }}
|
||||
livenessProbe:
|
||||
exec:
|
||||
command:
|
||||
- rabbitmqctl
|
||||
- status
|
||||
command: ["sh", "-c", "curl -f --user {{ .Values.rabbitmq.username }}:$RABBITMQ_PASSWORD 127.0.0.1:{{ .Values.rabbitmq.managerPort }}/api/healthchecks/node"]
|
||||
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
|
||||
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
|
||||
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
|
||||
@@ -101,9 +98,7 @@ spec:
|
||||
{{- if .Values.readinessProbe.enabled }}
|
||||
readinessProbe:
|
||||
exec:
|
||||
command:
|
||||
- rabbitmqctl
|
||||
- status
|
||||
command: ["sh", "-c", "curl -f --user {{ .Values.rabbitmq.username }}:$RABBITMQ_PASSWORD 127.0.0.1:{{ .Values.rabbitmq.managerPort }}/api/healthchecks/node"]
|
||||
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
|
||||
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
|
||||
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
|
||||
@@ -123,6 +118,8 @@ spec:
|
||||
fieldPath: status.podIP
|
||||
- name: RABBITMQ_USE_LONGNAME
|
||||
value: "true"
|
||||
- name: RABBITMQ_ULIMIT_NOFILES
|
||||
value: {{ .Values.rabbitmq.ulimitNofiles | quote }}
|
||||
- name: RABBITMQ_NODENAME
|
||||
value: "rabbit@$(MY_POD_IP)"
|
||||
- name: K8S_SERVICE_NAME
|
||||
|
||||
@@ -30,12 +30,12 @@ rbacEnabled: true
|
||||
## section of specific values for rabbitmq
|
||||
rabbitmq:
|
||||
## RabbitMQ application username
|
||||
## ref: https://github.com/bitnami/bitnami-docker-rabbitmq/blob/master/README.md#creating-a-database-user-on-first-run
|
||||
## ref: https://github.com/bitnami/bitnami-docker-rabbitmq#environment-variables
|
||||
##
|
||||
username: user
|
||||
|
||||
## RabbitMQ application password
|
||||
## ref: https://github.com/bitnami/bitnami-docker-rabbitmq/blob/master/README.md#creating-a-database-user-on-first-run
|
||||
## ref: https://github.com/bitnami/bitnami-docker-rabbitmq#environment-variables
|
||||
##
|
||||
# password:
|
||||
|
||||
@@ -65,6 +65,12 @@ rabbitmq:
|
||||
##
|
||||
diskFreeLimit: '"6GiB"'
|
||||
|
||||
## RabbitMQ Max File Descriptors
|
||||
## ref: https://github.com/bitnami/bitnami-docker-rabbitmq#environment-variables
|
||||
## ref: https://www.rabbitmq.com/install-debian.html#kernel-resource-limits
|
||||
##
|
||||
ulimitNofiles: '65536'
|
||||
|
||||
## Plugins to enable
|
||||
plugins: |-
|
||||
[rabbitmq_management,rabbitmq_peer_discovery_k8s].
|
||||
|
||||
@@ -28,13 +28,13 @@ rbacEnabled: true
|
||||
|
||||
## section of specific values for rabbitmq
|
||||
rabbitmq:
|
||||
## RabbitMQ application username
|
||||
## ref: https://github.com/bitnami/bitnami-docker-rabbitmq/blob/master/README.md#creating-a-database-user-on-first-run
|
||||
## RabbitMQ application username
|
||||
## ref: https://github.com/bitnami/bitnami-docker-rabbitmq#environment-variables
|
||||
##
|
||||
username: user
|
||||
|
||||
## RabbitMQ application password
|
||||
## ref: https://github.com/bitnami/bitnami-docker-rabbitmq/blob/master/README.md#creating-a-database-user-on-first-run
|
||||
## ref: https://github.com/bitnami/bitnami-docker-rabbitmq#environment-variables
|
||||
##
|
||||
# password:
|
||||
|
||||
@@ -74,6 +74,12 @@ rabbitmq:
|
||||
##
|
||||
diskFreeLimit: '"6GiB"'
|
||||
|
||||
## RabbitMQ Max File Descriptors
|
||||
## ref: https://github.com/bitnami/bitnami-docker-rabbitmq#environment-variables
|
||||
## ref: https://www.rabbitmq.com/install-debian.html#kernel-resource-limits
|
||||
##
|
||||
ulimitNofiles: '65536'
|
||||
|
||||
## Plugins to enable
|
||||
plugins: |-
|
||||
[rabbitmq_management, rabbitmq_peer_discovery_k8s].
|
||||
|
||||
Reference in New Issue
Block a user