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 · 3 comments
Open

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

pshanoop opened this issue Mar 27, 2024 · 3 comments

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?

@akshat-rubrik
Copy link

Can we add this to docs please?

@fdrab
Copy link

fdrab commented Aug 15, 2024

I'm using the existingConfig and now I have a secret called st2-secrets-conf that contains the DB / LDAP / RabbitMQ connection info and also a configMap called -st2-config that contains both st2.docker.conf that contains redis and rabbitMQ connection info in clear text.

And I think that the only reason I don't have Mongo connection info there as well is that I'm not using the mongo chart.

imo there should be a way to force the installation to only accept credentials from secrets.

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

4 participants