From c059ea25d80d6165b67ee163252a682198d8933f Mon Sep 17 00:00:00 2001 From: Miecio Date: Tue, 9 Feb 2021 09:59:54 +0100 Subject: [PATCH] Feat: Dynamic superusers configuration (#104) Adds dynamic superusers configuration ### Motivation Allow dynamic superusers management. Adding new superuser entry to `.Values.auth.superUsers` will results in adding concatenated list to config ### Modifications Change static list to dynamic one --- charts/pulsar/templates/broker-configmap.yaml | 2 +- charts/pulsar/templates/proxy-configmap.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/pulsar/templates/broker-configmap.yaml b/charts/pulsar/templates/broker-configmap.yaml index f92e330..b67e5a8 100644 --- a/charts/pulsar/templates/broker-configmap.yaml +++ b/charts/pulsar/templates/broker-configmap.yaml @@ -110,7 +110,7 @@ data: authenticationEnabled: "true" {{- if .Values.auth.authorization.enabled }} authorizationEnabled: "true" - superUserRoles: {{ .Values.auth.superUsers.broker }},{{ .Values.auth.superUsers.proxy }},{{ .Values.auth.superUsers.client }} + superUserRoles: {{ .Values.auth.superUsers | values | join "," }} {{- end }} {{- if eq .Values.auth.authentication.provider "jwt" }} # token authentication configuration diff --git a/charts/pulsar/templates/proxy-configmap.yaml b/charts/pulsar/templates/proxy-configmap.yaml index c3e4bf6..a069878 100644 --- a/charts/pulsar/templates/proxy-configmap.yaml +++ b/charts/pulsar/templates/proxy-configmap.yaml @@ -65,7 +65,7 @@ data: # disable authorization on proxy and forward authorization credentials to broker authorizationEnabled: "false" forwardAuthorizationCredentials: "true" - superUserRoles: {{ .Values.auth.superUsers.broker }},{{ .Values.auth.superUsers.proxy }},{{ .Values.auth.superUsers.client }} + superUserRoles: {{ .Values.auth.superUsers | values | join "," }} {{- end }} {{- if eq .Values.auth.authentication.provider "jwt" }} # token authentication configuration