Skip to content

Commit 609da84

Browse files
authored
Merge pull request #63 from Lomonosow/master
Add mongo auth
2 parents 0e658cc + 9558f20 commit 609da84

File tree

4 files changed

+15
-1
lines changed

4 files changed

+15
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
## In Development
44

5+
## v0.13.0
6+
* Mongodb authentication is enabled by default (#63)
7+
58
## v0.12.0
69
* Move `st2web.annotations` to `st2web.service.annotations` to match `values.yaml` (#66)
710

Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v1
22
# Update StackStorm version here to rely on other Docker images tags
33
appVersion: 3.0dev
44
name: stackstorm-ha
5-
version: 0.12.0
5+
version: 0.13.0
66
description: StackStorm K8s Helm Chart, optimized for running StackStorm in HA environment.
77
home: https://stackstorm.com/#product
88
icon: https://avatars1.githubusercontent.com/u/4969009

templates/configmaps_st2-conf.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@ data:
2727
url = amqp://{{ required "rabbitmq-ha.rabbitmqUsername is required!" (index .Values "rabbitmq-ha" "rabbitmqUsername") }}:{{ required "rabbitmq-ha.rabbitmqPassword is required!" (index .Values "rabbitmq-ha" "rabbitmqPassword") }}@{{ .Release.Name }}-rabbitmq-ha-discovery:5672
2828
[database]
2929
# TODO: ReplicaSet connection string needs templating based on number of MongoDB nodes
30+
{{- if index .Values "mongodb-ha" "auth" "enabled" }}
31+
host = mongodb://{{ required "mongodb-ha.auth.adminUser is required!" (index .Values "mongodb-ha" "auth" "adminUser") }}:{{ required "mongodb-ha.auth.adminPassword is required!" (index .Values "mongodb-ha" "auth" "adminPassword") }}@{{ .Release.Name }}-mongodb-ha/?authSource=admin&replicaSet=rs0
32+
{{ else }}
3033
host = mongodb://{{ .Release.Name }}-mongodb-ha/?replicaSet=rs0
34+
{{- end }}
3135
3236
# User-defined st2 config with custom settings applied on top of everything else.
3337
# The order of merging: st2.conf < st2.docker.conf < st2.user.conf

values.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,13 @@ mongodb-ha:
398398
image:
399399
# StackStorm currently supports maximum MongoDB v3.4
400400
tag: 3.4
401+
auth:
402+
enabled: true
403+
# NB! It's highly recommended to change ALL defaults!
404+
adminUser: "admin"
405+
adminPassword: "XeL5Rxwj7F0Wt43tFZVTN7H8Sg5XDHmK"
406+
# Minimal key length is 6 symbols
407+
key: "82PItDpqroti5RngOA7UqbHH7c6bFUwy"
401408

402409
##
403410
## RabbitMQ HA configuration (3rd party chart dependency)

0 commit comments

Comments
 (0)