Skip to content

Commit d3a794c

Browse files
authored
Merge pull request #197 from cognifloyd/secrets_api_key
Allow setting an ST2_API_KEY for st2chatops instead of user/pass
2 parents ed8f5fb + aabf3dc commit d3a794c

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
* Removed reference to st2-license pullSecrets, which was missed when removing enterprise flags (#192) (by @cognifloyd)
66
* Add optional imagePullSecrets to ServiceAccount using `serviceAccount.pullSecret` from values.yaml. If pods do not have imagePullSecrets (eg without `image.pullSecret` in values.yaml), k8s populates them from the ServiceAccount. (#196) (by @cognifloyd)
77
* Reformat some yaml strings so that single quotes wrap strings that include double quotes (#194) (by @cognifloyd)
8+
* st2chatops change: If `st2chatops.env.ST2_API_KEY` is defined, do not set `ST2_AUTH_USERNAME` or `ST2_AUTH_PASSWORD` env vars any more. (#197) (by @cognifloyd)
9+
810

911
## v0.60.0
1012
* Switch st2 version to `v3.5dev` as a new latest development version (#187)

templates/deployments.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1376,6 +1376,7 @@ spec:
13761376
- name: st2chatops
13771377
image: '{{ .Values.st2chatops.image.repository | default "stackstorm" }}/{{ .Values.st2chatops.image.name | default "st2chatops" }}:{{ tpl (.Values.st2chatops.image.tag | default .Chart.AppVersion) . }}'
13781378
imagePullPolicy: {{ .Values.st2chatops.image.pullPolicy | default .Values.image.pullPolicy }}
1379+
{{- if not (hasKey .Values.st2chatops.env "ST2_API_KEY") }}
13791380
env:
13801381
- name: ST2_AUTH_USERNAME
13811382
valueFrom:
@@ -1387,6 +1388,7 @@ spec:
13871388
secretKeyRef:
13881389
name: {{ .Release.Name }}-st2-auth
13891390
key: password
1391+
{{- end }}
13901392
envFrom:
13911393
- configMapRef:
13921394
name: {{ .Release.Name }}-st2-urls

values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,9 @@ st2chatops:
422422
env:
423423
HUBOT_ADAPTER: slack
424424
HUBOT_SLACK_TOKEN: xoxb-CHANGE-ME-PLEASE
425+
# If ST2_API_KEY is defined, then ST2_AUTH_USERNAME/PASSWORD will not be exposed to st2chatops.
426+
# Please make sure that the key in ST2_API_KEY gets added to st2.apikeys above so that chatops can use this key.
427+
#ST2_API_KEY: 12345
425428
# Set custom generated st2chatops Docker image source
426429
# Otherwise default https://hub.docker.com/r/stackstorm/st2chatops is used
427430
image: {}

0 commit comments

Comments
 (0)