# Copyright 2017 The Openstack-Helm Authors.
#
# 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.

# Default values for rabbitmq.
# This is a YAML-formatted file.
# Declare name/value pairs to be passed into your templates.
# name: value

labels:
  node_selector_key: openstack-control-plane
  node_selector_value: enabled

images:
  tags:
    rabbitmq: docker.io/rabbitmq:3.7
    dep_check: quay.io/stackanetes/kubernetes-entrypoint:v0.2.1
  pull_policy: "IfNotPresent"

pod:
  affinity:
    anti:
      type:
        default: preferredDuringSchedulingIgnoredDuringExecution
      topologyKey:
        default: kubernetes.io/hostname
  replicas:
    server: 3
  resources:
    enabled: false
    server:
      limits:
        memory: "128Mi"
        cpu: "500m"
      requests:
        memory: "128Mi"
        cpu: "500m"

conf:
  enabled_plugins:
    - rabbitmq_management
    - rabbitmq_peer_discovery_k8s
  rabbitmq:
    listeners:
      tcp:
        #NOTE(portdirect): This is always defined via the endpoints section.
        1: null
    cluster_formation:
      peer_discovery_backend: rabbit_peer_discovery_k8s
      k8s:
        address_type: ip
      node_cleanup:
        interval: "10"
        only_log_warning: "false"
    cluster_partition_handling: autoheal
    queue_master_locator: min-masters
    loopback_users.guest: "false"

dependencies:
  rabbitmq:
    jobs: null

# typically overriden by environmental
# values, but should include all endpoints
# required by this chart
endpoints:
  cluster_domain_suffix: cluster.local
  oslo_messaging:
    auth:
      erlang_cookie: openstack-cookie
      user:
        username: rabbitmq
        password: password
    hosts:
      default: rabbitmq
    host_fqdn_override:
      default: null
    path: /
    scheme: rabbit
    port:
      amqp:
        default: 5672
      http:
        default: 15672

manifests:
  configmap_bin: true
  configmap_etc: true
  service: true
  statefulset: true