Skip to content

Commit

Permalink
Merge pull request #63 from Lomonosow/master
Browse files Browse the repository at this point in the history
Add mongo auth
  • Loading branch information
warrenvw authored May 10, 2019
2 parents 0e658cc + 9558f20 commit 609da84
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## In Development

## v0.13.0
* Mongodb authentication is enabled by default (#63)

## v0.12.0
* Move `st2web.annotations` to `st2web.service.annotations` to match `values.yaml` (#66)

Expand Down
2 changes: 1 addition & 1 deletion Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
# Update StackStorm version here to rely on other Docker images tags
appVersion: 3.0dev
name: stackstorm-ha
version: 0.12.0
version: 0.13.0
description: StackStorm K8s Helm Chart, optimized for running StackStorm in HA environment.
home: https://stackstorm.com/#product
icon: https://avatars1.githubusercontent.com/u/4969009
Expand Down
4 changes: 4 additions & 0 deletions templates/configmaps_st2-conf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ data:
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
[database]
# TODO: ReplicaSet connection string needs templating based on number of MongoDB nodes
{{- if index .Values "mongodb-ha" "auth" "enabled" }}
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
{{ else }}
host = mongodb://{{ .Release.Name }}-mongodb-ha/?replicaSet=rs0
{{- end }}
# User-defined st2 config with custom settings applied on top of everything else.
# The order of merging: st2.conf < st2.docker.conf < st2.user.conf
Expand Down
7 changes: 7 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,13 @@ mongodb-ha:
image:
# StackStorm currently supports maximum MongoDB v3.4
tag: 3.4
auth:
enabled: true
# NB! It's highly recommended to change ALL defaults!
adminUser: "admin"
adminPassword: "XeL5Rxwj7F0Wt43tFZVTN7H8Sg5XDHmK"
# Minimal key length is 6 symbols
key: "82PItDpqroti5RngOA7UqbHH7c6bFUwy"

##
## RabbitMQ HA configuration (3rd party chart dependency)
Expand Down

0 comments on commit 609da84

Please sign in to comment.