From b129537c3b65a30e758a70959f23cad936328094 Mon Sep 17 00:00:00 2001
From: David Hoese <david.hoese@ssec.wisc.edu>
Date: Tue, 7 Jul 2020 15:13:04 -0500
Subject: [PATCH] Use rabbitmq secret for user password

---
 .gitlab-ci.yml                          |  2 +-
 production/values-g16-grb.yaml          |  3 ++-
 production/values-geosphere-rabbit.yaml | 12 ++++++++++++
 3 files changed, 15 insertions(+), 2 deletions(-)
 create mode 100644 production/values-geosphere-rabbit.yaml

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 34d2ee1..6f12e20 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -109,7 +109,7 @@ deploy_prod_rabbit:
     - kubeconfig=$(basename $kubekorner_k3s_config)
     # install third-party rabbitmq server
     - helm repo add bitnami https://charts.bitnami.com/bitnami
-    - helm upgrade -v 2 --install --kubeconfig $kubeconfig --namespace $ns geosphere-rabbit bitnami/rabbitmq
+    - helm upgrade -v 2 --install --kubeconfig $kubeconfig -f production/values-geosphere-rabbit.yaml --namespace $ns geosphere-rabbit bitnami/rabbitmq
   rules:
     - if: '$kubekorner_k3s_config == ""'
       when: never
diff --git a/production/values-g16-grb.yaml b/production/values-g16-grb.yaml
index 1da3406..bf80cfa 100644
--- a/production/values-g16-grb.yaml
+++ b/production/values-g16-grb.yaml
@@ -5,4 +5,5 @@ grbProcessor:
 
 grbNotifier:
   rabbitOut:
-    host: "geosphere-rabbit-rabbitmq"
\ No newline at end of file
+    host: "geosphere-rabbit-rabbitmq"
+    passwordSecret: "geosphere-rabbit-rabbitmq"
\ No newline at end of file
diff --git a/production/values-geosphere-rabbit.yaml b/production/values-geosphere-rabbit.yaml
new file mode 100644
index 0000000..3fbe896
--- /dev/null
+++ b/production/values-geosphere-rabbit.yaml
@@ -0,0 +1,12 @@
+#rabbitmq:
+#  configuration: |-
+#    ## Clustering
+#    cluster_formation.peer_discovery_backend  = rabbit_peer_discovery_k8s
+#    cluster_formation.k8s.host = kubernetes.default.svc.cluster.local
+#    cluster_formation.node_cleanup.interval = 10
+#    cluster_formation.node_cleanup.only_log_warning = true
+#    cluster_partition_handling = autoheal
+#    # queue master locator
+#    queue_master_locator=min-masters
+#    # enable guest user
+#    loopback_users.guest = false
-- 
GitLab