diff --git a/CHANGELOG.md b/CHANGELOG.md index 971aac49..6654e95b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/Chart.yaml b/Chart.yaml index 80efa630..ccfeac0e 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -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 diff --git a/templates/configmaps_st2-conf.yaml b/templates/configmaps_st2-conf.yaml index 6a3266f6..a9fd8cf5 100644 --- a/templates/configmaps_st2-conf.yaml +++ b/templates/configmaps_st2-conf.yaml @@ -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 diff --git a/values.yaml b/values.yaml index ddd26c4b..0dbf9fcf 100644 --- a/values.yaml +++ b/values.yaml @@ -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)