-
-
Notifications
You must be signed in to change notification settings - Fork 107
/
Copy pathconfigmaps_st2-conf.yaml
51 lines (50 loc) · 2.73 KB
/
configmaps_st2-conf.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Release.Name }}-st2-config
annotations:
description: Custom StackStorm config which will apply settings on top of default st2.conf
labels: {{- include "stackstorm-ha.labels" (list $ "st2") | nindent 4 }}
data:
# Docker/K8s-based st2 config file used for templating service names and common overrides on top of original st2.conf.
# The order of merging: st2.conf < st2.docker.conf < st2.user.conf
st2.docker.conf: |
[auth]
api_url = http://{{ .Release.Name }}-st2api:9101/
[system_user]
user = {{ .Values.st2.system_user.user }}
ssh_key_file = {{ tpl .Values.st2.system_user.ssh_key_file . }}
{{- if index .Values "redis" "enabled" }}
[coordination]
url = redis://{{ template "stackstorm-ha.redis-password" $ }}{{ template "stackstorm-ha.redis-nodes" $ }}
{{- end }}
{{- if index .Values "rabbitmq" "enabled" }}
[messaging]
url = amqp://{{ required "rabbitmq.auth.username is required!" (index .Values "rabbitmq" "auth" "username") }}:{{ required "rabbitmq.auth.password is required!" (index .Values "rabbitmq" "auth" "password") }}@{{ .Release.Name }}-rabbitmq:5672{{ required "rabbitmq.ingress.path is required!" (index .Values "rabbitmq" "ingress" "path") }}
{{- end }}
{{- if index .Values "mongodb" "enabled" }}
[database]
{{- if index .Values "mongodb" "auth" "enabled" }}
host = mongodb://{{ template "stackstorm-ha.mongodb-nodes" $ }}/{{ required "mongodb.auth.database is required!" (index .Values "mongodb" "auth" "database") }}?authSource={{ required "mongodb.auth.database is required!" (index .Values "mongodb" "auth" "database") }}&replicaSet={{ index .Values "mongodb" "replicaSetName" }}
username = {{ required "mongodb.auth.username is required!" (index .Values "mongodb" "auth" "username") }}
password = {{ required "mongodb.auth.password is required!" (index .Values "mongodb" "auth" "password") }}
db_name = {{ required "mongodb.auth.database is required!" (index .Values "mongodb" "auth" "database") }}
{{- else }}
host = mongodb://{{ template "stackstorm-ha.mongodb-nodes" $ }}/?replicaSet={{ index .Values "mongodb" "replicaSetName" }}
{{- end }}
port = {{ index .Values "mongodb" "service" "port" }}
{{- end }}
{{- if ne "disable" (default "" .Values.st2.datastore_crypto_key) }}
[keyvalue]
encryption_key_path = /etc/st2/keys/datastore_key.json
{{- end }}
{{- if .Values.st2.rbac.enabled }}
[rbac]
enable = True
backend = default
{{- 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
st2.user.conf: |
{{- tpl .Values.st2.config . | nindent 4 }}