openstack-helm-infra/rabbitmq/templates/secret-rabbitmq-users-credentials.yaml
Vasyl Saienko 298c333ac7 [rabbitmq] Allow to bootstrap rabbitmq with initial config
Prepare rabbitmq to be running in non clustered mode, in which
it may be useful to bootstrap cluster with fresh data each time
since we do not use durable queues in openstack that are stored
on filesystem.

The two new data strucutre in rabbitmq Values are added:

  users:
    auth:
      keystone_service:
        username: keystone
        password: password
    path: /keystone
  aux_conf:
    policies:
      - vhost: "keystone"
        name: "ha_ttl_keystone"
        definition:
          ha-mode: "all"
          ha-sync-mode: "automatic"
          message-ttl: 70000
        priority: 0
        apply-to: all
        pattern: '^(?!amq\.).*'

Change-Id: Ia0dd1a8afe7b6e894bcbeafedf75131de0023df0
2024-09-13 11:32:13 +00:00

31 lines
948 B
YAML

{{/*
Copyright 2019 Mirantis Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{- if .Values.conf.users }}
{{- $envAll := . }}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ printf "%s-%s" $envAll.deployment_name "users-credentials" | quote }}
labels:
{{ tuple $envAll "rabbitmq" "server" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
type: Opaque
data:
RABBITMQ_USERS: {{ toJson .Values.conf.users | b64enc }}
{{- end }}