Skip to content
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

Use Secret for st2.docker.conf instead of ConfigMap #408

Open
pshanoop opened this issue Mar 27, 2024 · 1 comment
Open

Use Secret for st2.docker.conf instead of ConfigMap #408

pshanoop opened this issue Mar 27, 2024 · 1 comment

Comments

@pshanoop
Copy link

Here all these credentials are stored in ConfigMap

Doesn't it make more sense to use Secret since this contains credentials.

@cognifloyd
Copy link
Member

This is supported via st2.existingConfigSecret. You create a secret with your st2.conf contents, and then pass that secret name to the chart. It then gets mounted like this:

{{- if $.Values.st2.existingConfigSecret }}
- name: st2-config-secrets-vol
mountPath: /etc/st2/st2.secrets.conf
subPath: st2.secrets.conf
{{- end }}

{{- if $.Values.st2.existingConfigSecret }}
- name: st2-config-secrets-vol
secret:
secretName: {{ $.Values.st2.existingConfigSecret }}
{{- end }}

The value is described here:

stackstorm-k8s/values.yaml

Lines 112 to 116 in fabbea9

# Custom StackStorm config (st2.secrets.conf) which will be created from the key 'st2.secrets.conf' within this secret.
# If this is defined, '--config-file=/etc/st2/st2.secrets.conf' will be added to the end of the command line arguments
# for all pods, superseding all other configuration values.
# This secret must be populated outside of this chart.
# existingConfigSecret: stackstorm-config-secret

Does that resolve your concerns?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants