-
-
Notifications
You must be signed in to change notification settings - Fork 117
template st2client conf #262
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
Conversation
|
@armab RFR |
arm4b
left a comment
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.
Really nice feature now that would work for everyone!
Thanks a lot for finding the way here 👍
Left one minor comment to address, otherwise looks great.
| # st2client is a special purpose actionrunner pod, but you can customize it separately | ||
| st2client: | ||
| # st2client config (~/.st2/config) template. | ||
| # You can access env variables here because this is used in a bash heredoc. |
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.
Nice!
Let's just include a link to https://docs.stackstorm.com/reference/cli.html#configuration-file in comments for both Helm value definitions.
That'll help users find the use cases and configuration examples easily.
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.
done
This moves the
/root/.st2/configtemplate (a bash heredoc) to values so that it can be adjusted based on install requirements. This also makes secrets inenvFromSecretsavailable to thegenerate-st2client-configinitContainers so that they can be used within the bash heredoc template. The template value is also passed throughtplto support helm templating for any non-secret config such as injecting the timezone.Relevant st2 docs on the st2client config file: https://docs.stackstorm.com/reference/cli.html#configuration-file
Closes #233
Closes #256
Closes #261
Note: This PR is an alternate implementation of #256 and #261 based on @armab's feedback in #261.
I want to provide the
ST2_API_KEYviaenvFromSecrets, but the/root/.st2/clientconfig with ausernametakes precedence over theST2_API_KEYenv var. Templating the file allows me to either inject the api_key in the config file, or remove the credentials so that theST2_API_KEYvar is used.