[bitnami/rabbitmq] Add support for multiple LDAP servers (#3066)

Signed-off-by: juan131 <juanariza@vmware.com>
This commit is contained in:
Juan Ariza Toledano
2020-07-08 13:08:07 +02:00
committed by GitHub
parent d8fb3559cc
commit 4a2884cdeb
6 changed files with 44 additions and 24 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
apiVersion: v1
name: rabbitmq
version: 7.4.8
version: 7.5.0
appVersion: 3.8.5
description: Open source message broker software that implements the Advanced Message Queuing Protocol (AMQP)
keywords:
+8 -8
View File
@@ -108,9 +108,9 @@ The following table lists the configurable parameters of the RabbitMQ chart and
| `extraConfiguration` | Extra configuration to be appended to RabbitMQ configuration | Check `values.yaml` file |
| `advancedConfiguration` | Extra configuration (in classic format) | Check `values.yaml` file |
| `ldap.enabled` | Enable LDAP support | `false` |
| `ldap.server` | LDAP server | `""` |
| `ldap.port` | LDAP port | `389` |
| `ldap.user_dn_pattern` | DN used to bind to LDAP | `cn=${username},dc=example,dc=org` |
| `ldap.servers` | List of LDAP servers hostnames | `[]` |
| `ldap.port` | LDAP servers port | `389` |
| `ldap.user_dn_pattern` | Pattern used to translate the provided username into a value to be used for the LDAP bind | `cn=${username},dc=example,dc=org` |
| `ldap.tls.enabled` | Enable TLS for LDAP connections (check advancedConfiguration parameter in values.yml) | `false` |
### Statefulset parameters
@@ -432,16 +432,16 @@ extraConfiguration: |
LDAP support can be enabled in the chart by specifying the `ldap.` parameters while creating a release. The following parameters should be configured to properly enable the LDAP support in the chart.
- `ldap.enabled`: Enable LDAP support. Defaults to `false`.
- `ldap.server`: LDAP server host. No defaults.
- `ldap.port`: LDAP server port. `389`.
- `ldap.user_dn_pattern`: DN used to bind to LDAP. `cn=${username},dc=example,dc=org`.
- `ldap.servers`: List of LDAP servers hostnames. No defaults.
- `ldap.port`: LDAP servers port. `389`.
- `ldap.user_dn_pattern`: Pattern used to translate the provided username into a value to be used for the LDAP bind. Defaults to `cn=${username},dc=example,dc=org`.
- `ldap.tls.enabled`: Enable TLS for LDAP connections. Defaults to `false`.
For example:
```console
ldap.enabled="true"
ldap.server="my-ldap-server"
ldap.enabled=true
ldap.serverss[0]="my-ldap-server"
ldap.port="389"
ldap.user_dn_pattern="cn=${username},dc=example,dc=org"
```
+4 -3
View File
@@ -173,14 +173,15 @@ Validate values of rabbitmq - LDAP support
*/}}
{{- define "rabbitmq.validateValues.ldap" -}}
{{- if .Values.ldap.enabled }}
{{- if not (and .Values.ldap.server .Values.ldap.port .Values.ldap.user_dn_pattern) }}
{{- $serversListLength := len .Values.ldap.servers }}
{{- if or (not (gt $serversListLength 0)) (not (and .Values.ldap.port .Values.ldap.user_dn_pattern)) }}
rabbitmq: LDAP
Invalid LDAP configuration. When enabling LDAP support, the parameters "ldap.server",
Invalid LDAP configuration. When enabling LDAP support, the parameters "ldap.servers",
"ldap.port", and "ldap. user_dn_pattern" are mandatory. Please provide them:
$ helm install {{ .Release.Name }} bitnami/rabbitmq \
--set ldap.enabled=true \
--set ldap.server="lmy-ldap-server" \
--set ldap.servers[0]="lmy-ldap-server" \
--set ldap.port="389" \
--set user_dn_pattern="cn=${username},dc=example,dc=org"
{{- end -}}
+5 -5
View File
@@ -122,14 +122,14 @@ spec:
- name: RABBITMQ_NODE_NAME
value: "rabbit@$(MY_POD_NAME)"
{{- end }}
{{- if .Values.ldap.enabled }}
- name: RABBITMQ_LDAP_ENABLE
value: "yes"
value: {{ ternary "yes" "no" .Values.ldap.enabled | quote }}
{{- if .Values.ldap.enabled }}
- name: RABBITMQ_LDAP_TLS
value: {{ ternary "yes" "no" .Values.ldap.tls.enabled | quote }}
- name: RABBITMQ_LDAP_SERVER
value: {{ .Values.ldap.server }}
- name: RABBITMQ_LDAP_SERVER_PORT
- name: RABBITMQ_LDAP_SERVERS
value: {{ .Values.ldap.servers | join "," | quote }}
- name: RABBITMQ_LDAP_SERVERS_PORT
value: {{ .Values.ldap.port | quote }}
- name: RABBITMQ_LDAP_USER_DN_PATTERN
value: {{ .Values.ldap.user_dn_pattern }}
+13 -4
View File
@@ -209,8 +209,9 @@ configuration: |-
{{- if .Values.ldap.enabled }}
auth_backends.1 = rabbit_auth_backend_ldap
auth_backends.2 = internal
auth_ldap.servers.1 = {{ .Values.ldap.server }}
auth_ldap.port = {{ .Values.ldap.port }}
{{- range $index, $server := .Values.ldap.servers }}
auth_ldap.servers.{{ add $index 1 }} = {{ $server }}
{{- end }} auth_ldap.port = {{ .Values.ldap.port }}
auth_ldap.user_dn_pattern = {{ .Values.ldap.user_dn_pattern }}
{{- if .Values.ldap.tls.enabled }}
auth_ldap.use_ssl = true
@@ -257,11 +258,19 @@ advancedConfiguration: |-
##
ldap:
enabled: false
server: ""
## List of LDAP servers hostnames
##
servers: []
## LDAP servers port
##
port: "389"
## Pattern used to translate the provided username into a value to be used for the LDAP bind
## ref: https://www.rabbitmq.com/ldap.html#usernames-and-dns
##
user_dn_pattern: cn=${username},dc=example,dc=org
tls:
# If you enabled TLS/SSL you can set advaced options using the advancedConfiguration parameter.
## If you enabled TLS/SSL you can set advaced options using the advancedConfiguration parameter.
##
enabled: false
## extraVolumes and extraVolumeMounts allows you to mount other volumes
+13 -3
View File
@@ -209,7 +209,9 @@ configuration: |-
{{- if .Values.ldap.enabled }}
auth_backends.1 = rabbit_auth_backend_ldap
auth_backends.2 = internal
auth_ldap.servers.1 = {{ .Values.ldap.server }}
{{- range $index, $server := .Values.ldap.servers }}
auth_ldap.servers.{{ add $index 1 }} = {{ $server }}
{{- end }}
auth_ldap.port = {{ .Values.ldap.port }}
auth_ldap.user_dn_pattern = {{ .Values.ldap.user_dn_pattern }}
{{- if .Values.ldap.tls.enabled }}
@@ -257,11 +259,19 @@ advancedConfiguration: |-
##
ldap:
enabled: false
server: ""
## List of LDAP servers hostnames
##
servers: []
## LDAP servers port
##
port: "389"
## Pattern used to translate the provided username into a value to be used for the LDAP bind
## ref: https://www.rabbitmq.com/ldap.html#usernames-and-dns
##
user_dn_pattern: cn=${username},dc=example,dc=org
tls:
# If you enabled TLS/SSL you can set advaced options using the advancedConfiguration parameter.
## If you enabled TLS/SSL you can set advaced options using the advancedConfiguration parameter.
##
enabled: false
## extraVolumes and extraVolumeMounts allows you to mount other volumes