RabbitMQ: permit multiple deployments within a single namespace
This PS updates the RabbitMQ chart to permit multiple deployments within a single namespace. Change-Id: Idd3f13448b25a88d2b42db565ddb7b6af0a9f3cd
This commit is contained in:
parent
5f26fcd91e
commit
d37ed6ffec
@ -20,7 +20,7 @@ limitations under the License.
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: rabbitmq-bin
|
||||
name: {{ printf "%s-%s" $envAll.Release.Name "rabbitmq-bin" | quote }}
|
||||
data:
|
||||
rabbitmq-liveness.sh: |
|
||||
{{ tuple "bin/_rabbitmq-liveness.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
||||
|
@ -37,7 +37,7 @@ limitations under the License.
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: rabbitmq-etc
|
||||
name: {{ printf "%s-%s" $envAll.Release.Name "rabbitmq-etc" | quote }}
|
||||
data:
|
||||
enabled_plugins: |
|
||||
{{ tuple "etc/_enabled_plugins.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
||||
|
@ -18,27 +18,27 @@ limitations under the License.
|
||||
{{- $envAll := . }}
|
||||
{{- $dependencies := .Values.dependencies.rabbitmq }}
|
||||
|
||||
{{- $serviceAccountName := "rabbitmq" }}
|
||||
{{ tuple $envAll $dependencies $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
|
||||
{{- $rcControllerName := printf "%s-%s" $envAll.Release.Name "rabbitmq" }}
|
||||
{{ tuple $envAll $dependencies $rcControllerName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: {{ $serviceAccountName }}
|
||||
name: {{ $rcControllerName | quote }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: {{ $serviceAccountName }}
|
||||
name: {{ $rcControllerName | quote }}
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ $serviceAccountName }}
|
||||
name: {{ $rcControllerName | quote }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: {{ $serviceAccountName }}
|
||||
name: {{ $rcControllerName | quote }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
rules:
|
||||
- apiGroups:
|
||||
@ -56,7 +56,7 @@ rules:
|
||||
apiVersion: apps/v1beta1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: rabbitmq
|
||||
name: {{ $rcControllerName | quote }}
|
||||
spec:
|
||||
serviceName: {{ tuple "oslo_messaging" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }}
|
||||
replicas: {{ .Values.pod.replicas.server }}
|
||||
@ -68,7 +68,7 @@ spec:
|
||||
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }}
|
||||
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }}
|
||||
spec:
|
||||
serviceAccountName: {{ $serviceAccountName }}
|
||||
serviceAccountName: {{ $rcControllerName | quote }}
|
||||
affinity:
|
||||
{{ tuple $envAll "rabbitmq" "server" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
|
||||
nodeSelector:
|
||||
@ -131,10 +131,10 @@ spec:
|
||||
emptyDir: {}
|
||||
- name: rabbitmq-bin
|
||||
configMap:
|
||||
name: rabbitmq-bin
|
||||
name: {{ printf "%s-%s" $envAll.Release.Name "rabbitmq-bin" | quote }}
|
||||
defaultMode: 0555
|
||||
- name: rabbitmq-etc
|
||||
configMap:
|
||||
name: rabbitmq-etc
|
||||
name: {{ printf "%s-%s" $envAll.Release.Name "rabbitmq-etc" | quote }}
|
||||
defaultMode: 0444
|
||||
{{ end }}
|
||||
|
Loading…
Reference in New Issue
Block a user