-
-
Notifications
You must be signed in to change notification settings - Fork 106
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
template st2client conf #262
Conversation
@armab RFR |
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.
@@ -623,6 +623,14 @@ st2sensorcontainer: | |||
# The st2client deployment/pod simplifies ad-hoc administration. | |||
# 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/config
template (a bash heredoc) to values so that it can be adjusted based on install requirements. This also makes secrets inenvFromSecrets
available to thegenerate-st2client-config
initContainers so that they can be used within the bash heredoc template. The template value is also passed throughtpl
to 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_KEY
viaenvFromSecrets
, but the/root/.st2/client
config with ausername
takes precedence over theST2_API_KEY
env var. Templating the file allows me to either inject the api_key in the config file, or remove the credentials so that theST2_API_KEY
var is used.