-
-
Notifications
You must be signed in to change notification settings - Fork 117
Allow injection of env vars in any deployment #120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
c994ed6
72ce516
8388b0b
7f5ec95
3ced2e4
291d37d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -70,6 +70,13 @@ spec: | |||||||||
| # TODO: Add liveness/readiness probes (#3) | ||||||||||
| #livenessProbe: | ||||||||||
| #readinessProbe: | ||||||||||
| {{- if .Values.st2auth.env }} | ||||||||||
| env: | ||||||||||
| {{- range $env, $value := .Values.st2auth.env }} | ||||||||||
| - name: {{ $env | quote }} | ||||||||||
| value: {{ $value | quote }} | ||||||||||
| {{- end }} | ||||||||||
| {{- end }} | ||||||||||
| envFrom: | ||||||||||
| - configMapRef: | ||||||||||
| name: {{ .Release.Name }}-st2-urls | ||||||||||
|
|
@@ -191,6 +198,13 @@ spec: | |||||||||
| # TODO: Add liveness/readiness probes (#3) | ||||||||||
| #livenessProbe: | ||||||||||
| #readinessProbe: | ||||||||||
| {{- if .Values.st2api.env }} | ||||||||||
| env: | ||||||||||
| {{- range $env, $value := .Values.st2api.env }} | ||||||||||
| - name: {{ $env | quote }} | ||||||||||
| value: {{ $value | quote }} | ||||||||||
| {{- end }} | ||||||||||
| {{- end }} | ||||||||||
| envFrom: | ||||||||||
| - configMapRef: | ||||||||||
| name: {{ .Release.Name }}-st2-urls | ||||||||||
|
|
@@ -282,6 +296,13 @@ spec: | |||||||||
| # TODO: Add liveness/readiness probes (#3) | ||||||||||
| #livenessProbe: | ||||||||||
| #readinessProbe: | ||||||||||
| {{- if .Values.st2stream.env }} | ||||||||||
| env: | ||||||||||
| {{- range $env, $value := .Values.st2stream.env }} | ||||||||||
| - name: {{ $env | quote }} | ||||||||||
| value: {{ $value | quote }} | ||||||||||
| {{- end }} | ||||||||||
| {{- end }} | ||||||||||
| envFrom: | ||||||||||
| - configMapRef: | ||||||||||
| name: {{ .Release.Name }}-st2-urls | ||||||||||
|
|
@@ -370,6 +391,13 @@ spec: | |||||||||
| # path: /api/ | ||||||||||
| # port: 443 | ||||||||||
| # initialDelaySeconds: 3 | ||||||||||
| {{- if .Values.st2web.env }} | ||||||||||
| env: | ||||||||||
| {{- range $env, $value := .Values.st2web.env }} | ||||||||||
| - name: {{ $env | quote }} | ||||||||||
| value: {{ $value | quote }} | ||||||||||
| {{- end }} | ||||||||||
| {{- end }} | ||||||||||
| envFrom: | ||||||||||
| - configMapRef: | ||||||||||
| name: {{ .Release.Name }}-st2-urls | ||||||||||
|
|
@@ -437,6 +465,13 @@ spec: | |||||||||
| # TODO: Add liveness/readiness probes (#3) | ||||||||||
| #livenessProbe: | ||||||||||
| #readinessProbe: | ||||||||||
| {{- if .Values.st2rulesengine.env }} | ||||||||||
| env: | ||||||||||
| {{- range $env, $value := .Values.st2rulesengine.env }} | ||||||||||
| - name: {{ $env | quote }} | ||||||||||
| value: {{ $value | quote }} | ||||||||||
| {{- end }} | ||||||||||
| {{- end }} | ||||||||||
| envFrom: | ||||||||||
| - configMapRef: | ||||||||||
| name: {{ .Release.Name }}-st2-urls | ||||||||||
|
|
@@ -513,6 +548,13 @@ spec: | |||||||||
| # TODO: Add liveness/readiness probes (#3) | ||||||||||
| #livenessProbe: | ||||||||||
| #readinessProbe: | ||||||||||
| {{- if .Values.st2timersengine.env }} | ||||||||||
| env: | ||||||||||
| {{- range $env, $value := .Values.st2timersengine.env }} | ||||||||||
| - name: {{ $env | quote }} | ||||||||||
| value: {{ $value | quote }} | ||||||||||
| {{- end }} | ||||||||||
| {{- end }} | ||||||||||
| envFrom: | ||||||||||
| - configMapRef: | ||||||||||
| name: {{ .Release.Name }}-st2-urls | ||||||||||
|
|
@@ -588,6 +630,13 @@ spec: | |||||||||
| # TODO: Add liveness/readiness probes (#3) | ||||||||||
| #livenessProbe: | ||||||||||
| #readinessProbe: | ||||||||||
| {{- if .Values.st2workflowengine.env }} | ||||||||||
| env: | ||||||||||
| {{- range $env, $value := .Values.st2workflowengine.env }} | ||||||||||
| - name: {{ $env | quote }} | ||||||||||
| value: {{ $value | quote }} | ||||||||||
| {{- end }} | ||||||||||
| {{- end }} | ||||||||||
| envFrom: | ||||||||||
| - configMapRef: | ||||||||||
| name: {{ .Release.Name }}-st2-urls | ||||||||||
|
|
@@ -662,6 +711,13 @@ spec: | |||||||||
| # TODO: Add liveness/readiness probes (#3) | ||||||||||
| #livenessProbe: | ||||||||||
| #readinessProbe: | ||||||||||
| {{- if .Values.st2scheduler.env }} | ||||||||||
| env: | ||||||||||
| {{- range $env, $value := .Values.st2scheduler.env }} | ||||||||||
| - name: {{ $env | quote }} | ||||||||||
| value: {{ $value | quote }} | ||||||||||
| {{- end }} | ||||||||||
| {{- end }} | ||||||||||
| envFrom: | ||||||||||
| - configMapRef: | ||||||||||
| name: {{ .Release.Name }}-st2-urls | ||||||||||
|
|
@@ -737,6 +793,13 @@ spec: | |||||||||
| # TODO: Add liveness/readiness probes (#3) | ||||||||||
| #livenessProbe: | ||||||||||
| #readinessProbe: | ||||||||||
| {{- if .Values.st2notifier.env }} | ||||||||||
| env: | ||||||||||
| {{- range $env, $value := .Values.st2notifier.env }} | ||||||||||
| - name: {{ $env | quote }} | ||||||||||
| value: {{ $value | quote }} | ||||||||||
| {{- end }} | ||||||||||
| {{- end }} | ||||||||||
| envFrom: | ||||||||||
| - configMapRef: | ||||||||||
| name: {{ .Release.Name }}-st2-urls | ||||||||||
|
|
@@ -866,6 +929,13 @@ spec: | |||||||||
| - --single-sensor-mode | ||||||||||
| - --sensor-ref={{ .ref }} | ||||||||||
| {{- end }} | ||||||||||
| {{- if .env }} | ||||||||||
| env: | ||||||||||
| {{- range $env, $value := .env }} | ||||||||||
| - name: {{ $env | quote }} | ||||||||||
| value: {{ $value | quote }} | ||||||||||
| {{- end }} | ||||||||||
| {{- end }} | ||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And the template here would just be: |
||||||||||
| envFrom: | ||||||||||
| - configMapRef: | ||||||||||
| name: {{ $.Release.Name }}-st2-urls | ||||||||||
|
|
@@ -997,6 +1067,13 @@ spec: | |||||||||
| # TODO: Add liveness/readiness probes (#3) | ||||||||||
| #livenessProbe: | ||||||||||
| #readinessProbe: | ||||||||||
| {{- if .Values.st2actionrunner.env }} | ||||||||||
| env: | ||||||||||
| {{- range $env, $value := .Values.st2actionrunner.env }} | ||||||||||
| - name: {{ $env | quote }} | ||||||||||
| value: {{ $value | quote }} | ||||||||||
| {{- end }} | ||||||||||
| {{- end }} | ||||||||||
| envFrom: | ||||||||||
| - configMapRef: | ||||||||||
| name: {{ .Release.Name }}-st2-urls | ||||||||||
|
|
@@ -1097,6 +1174,13 @@ spec: | |||||||||
| # TODO: Add liveness/readiness probes (#3) | ||||||||||
| #livenessProbe: | ||||||||||
| #readinessProbe: | ||||||||||
| {{- if .Values.st2garbagecollector.env }} | ||||||||||
| env: | ||||||||||
| {{- range $env, $value := .Values.st2garbagecollector.env }} | ||||||||||
| - name: {{ $env | quote }} | ||||||||||
| value: {{ $value | quote }} | ||||||||||
| {{- end }} | ||||||||||
| {{- end }} | ||||||||||
| envFrom: | ||||||||||
| - configMapRef: | ||||||||||
| name: {{ .Release.Name }}-st2-urls | ||||||||||
|
|
@@ -1242,6 +1326,10 @@ spec: | |||||||||
| env: | ||||||||||
| - name: ST2CLIENT | ||||||||||
| value: "1" | ||||||||||
| {{- range $env, $value := .Values.st2client.env }} | ||||||||||
| - name: {{ $env | quote }} | ||||||||||
| value: {{ $value | quote }} | ||||||||||
| {{- end }} | ||||||||||
|
||||||||||
| envFrom: | ||||||||||
| - configMapRef: | ||||||||||
| name: {{ .Release.Name }}-st2-urls | ||||||||||
|
|
@@ -1369,6 +1457,10 @@ spec: | |||||||||
| secretKeyRef: | ||||||||||
| name: {{ .Release.Name }}-st2-auth | ||||||||||
| key: password | ||||||||||
| {{- range $env, $value := .Values.st2chatops.env }} | ||||||||||
| - name: {{ $env | quote }} | ||||||||||
| value: {{ $value | quote }} | ||||||||||
| {{- end }} | ||||||||||
|
||||||||||
| {{- range $env, $value := .Values.st2chatops.env }} | |
| - name: {{ $env | quote }} | |
| value: {{ $value | quote }} | |
| {{- end }} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,7 +16,7 @@ metadata: | |
| heritage: {{ .Release.Service }} | ||
| type: Opaque | ||
| data: | ||
| {{- range $env, $value := .Values.st2chatops.env }} | ||
| {{- range $env, $value := .Values.secrets.st2.st2chatops.env }} | ||
|
||
| {{ $env }}: {{ $value | b64enc | quote }} | ||
| {{- end }} | ||
| {{- end }} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -103,6 +103,8 @@ st2: | |
| affinity: {} | ||
| nodeSelector: {} | ||
| tolerations: [] | ||
| env: {} | ||
| # HTTP_PROXY: http://proxy:1234 | ||
|
Comment on lines
+177
to
+178
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice. I like the commented example. 👍 |
||
| # Import data into StackStorm's Key/Value datastore (https://docs.stackstorm.com/datastore.html) | ||
| keyvalue: | ||
| #- name: st2_version | ||
|
|
@@ -158,6 +160,9 @@ ingress: | |
| # TODO: Alternatively as part of reorganizing Helm values, consider moving values to existing `st2` and `st2web` sections ? (#14) | ||
| secrets: | ||
| st2: | ||
| st2chatops: | ||
|
||
| env: | ||
| HUBOT_SLACK_TOKEN: xoxb-CHANGE-ME-PLEASE | ||
cognifloyd marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| # Username, used to login to StackStorm system | ||
| username: st2admin | ||
| # Password, used to login to StackStorm system | ||
|
|
@@ -223,6 +228,8 @@ st2web: | |
| nodeSelector: {} | ||
| tolerations: [] | ||
| affinity: {} | ||
| env: {} | ||
| # HTTP_PROXY: http://proxy:1234 | ||
| # https://docs.stackstorm.com/reference/ha.html#st2auth | ||
| # Multiple st2auth processes can be behind a load balancer in an active-active configuration. | ||
| st2auth: | ||
|
|
@@ -233,6 +240,8 @@ st2auth: | |
| nodeSelector: {} | ||
| tolerations: [] | ||
| affinity: {} | ||
| env: {} | ||
| # HTTP_PROXY: http://proxy:1234 | ||
| # https://docs.stackstorm.com/reference/ha.html#st2api | ||
| # Multiple st2api process can be behind a load balancer in an active-active configuration. | ||
| st2api: | ||
|
|
@@ -243,6 +252,8 @@ st2api: | |
| nodeSelector: {} | ||
| tolerations: [] | ||
| affinity: {} | ||
| env: {} | ||
| # HTTP_PROXY: http://proxy:1234 | ||
| # https://docs.stackstorm.com/reference/ha.html#st2stream | ||
| # Multiple st2stream process can be behind a load balancer in an active-active configuration. | ||
| st2stream: | ||
|
|
@@ -253,6 +264,8 @@ st2stream: | |
| nodeSelector: {} | ||
| tolerations: [] | ||
| affinity: {} | ||
| env: {} | ||
| # HTTP_PROXY: http://proxy:1234 | ||
| # https://docs.stackstorm.com/reference/ha.html#st2rulesengine | ||
| # Multiple st2rulesengine processes can run in active-active with only connections to MongoDB and RabbitMQ. All these will share the TriggerInstance load and naturally pick up more work if one or more of the processes becomes unavailable. | ||
| st2rulesengine: | ||
|
|
@@ -263,6 +276,8 @@ st2rulesengine: | |
| nodeSelector: {} | ||
| tolerations: [] | ||
| affinity: {} | ||
| env: {} | ||
| # HTTP_PROXY: http://proxy:1234 | ||
| # https://docs.stackstorm.com/reference/ha.html#st2timersengine | ||
| # Only single replica is created via K8s Deployment as timersengine can't work in active-active mode at the moment and it relies on K8s failover/reschedule capabilities to address cases of process failure. | ||
| st2timersengine: | ||
|
|
@@ -272,6 +287,8 @@ st2timersengine: | |
| nodeSelector: {} | ||
| tolerations: [] | ||
| affinity: {} | ||
| env: {} | ||
| # HTTP_PROXY: http://proxy:1234 | ||
| # https://docs.stackstorm.com/reference/ha.html#st2workflowengine | ||
| # Multiple st2workflowengine processes can run in active-active mode and will share the load and pick up more work if one or more of the processes become available. | ||
| st2workflowengine: | ||
|
|
@@ -282,6 +299,8 @@ st2workflowengine: | |
| nodeSelector: {} | ||
| tolerations: [] | ||
| affinity: {} | ||
| env: {} | ||
| # HTTP_PROXY: http://proxy:1234 | ||
| # https://docs.stackstorm.com/reference/ha.html#st2scheduler | ||
| # TODO: Description TBD | ||
| st2scheduler: | ||
|
|
@@ -292,6 +311,8 @@ st2scheduler: | |
| nodeSelector: {} | ||
| tolerations: [] | ||
| affinity: {} | ||
| env: {} | ||
| # HTTP_PROXY: http://proxy:1234 | ||
| # https://docs.stackstorm.com/reference/ha.html#st2notifier | ||
| # st2notifier runs in active-active mode and requires for that coordination backend like Redis or Zookeeper | ||
| st2notifier: | ||
|
|
@@ -302,6 +323,8 @@ st2notifier: | |
| nodeSelector: {} | ||
| tolerations: [] | ||
| affinity: {} | ||
| env: {} | ||
| # HTTP_PROXY: http://proxy:1234 | ||
| # https://docs.stackstorm.com/reference/ha.html#st2actionrunner | ||
| # Multiple st2actionrunner processes can run in active-active with only connections to MongoDB and RabbitMQ. Work gets naturally | ||
| # distributed across runners via RabbitMQ. Adding more st2actionrunner processes increases the ability of StackStorm to execute actions. | ||
|
|
@@ -322,6 +345,8 @@ st2actionrunner: | |
| # - hostnames: | ||
| # - bar | ||
| # ip: 8.8.8.8 | ||
| env: {} | ||
| # HTTP_PROXY: http://proxy:1234 | ||
|
|
||
| # https://docs.stackstorm.com/reference/ha.html#st2garbagecollector | ||
| # Optional service that cleans up old executions and other operations data based on setup configurations. | ||
|
|
@@ -335,6 +360,12 @@ st2garbagecollector: | |
| nodeSelector: {} | ||
| tolerations: [] | ||
| affinity: {} | ||
| env: {} | ||
| # HTTP_PROXY: http://proxy:1234 | ||
|
|
||
| st2client: | ||
| env: {} | ||
| # HTTP_PROXY: http://proxy:1234 | ||
|
|
||
| ## | ||
| ## StackStorm ChatOps (https://docs.stackstorm.com/chatops/index.html) | ||
|
|
@@ -348,7 +379,6 @@ st2chatops: | |
| # for the full list of supported adapters and example ENV variables. | ||
| env: | ||
| HUBOT_ADAPTER: slack | ||
| HUBOT_SLACK_TOKEN: xoxb-CHANGE-ME-PLEASE | ||
cognifloyd marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| # Set custom generated st2chatops Docker image source | ||
| # Otherwise default https://hub.docker.com/r/stackstorm/st2chatops is used | ||
| image: {} | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this could be extracted into a helper to avoid some repetition.
So, here it would have:
And then the template would be: