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

Pack defaults do not get overridden when a pack is reinstalled #372

Open
bell-manz opened this issue Aug 25, 2023 · 2 comments
Open

Pack defaults do not get overridden when a pack is reinstalled #372

bell-manz opened this issue Aug 25, 2023 · 2 comments
Labels
feature Helm help wanted Extra attention is needed st2

Comments

@bell-manz
Copy link

Hi, it states here https://docs.stackstorm.com/latest/packs.html#overriding-pack-defaults that "in StackStorm 3.7.0 we have introduced the override feature, so that the metadata of a packs resources can be overridden by configuration files. This will always be read upon a reload or pack install," but it seems that through the stackstorm-k8s charts these overrides are only applied when you run 'st2ctl reload --register-all', and not when a pack is installed on the register_pack sub-action. Is this normal? How can I get StackStorm to re-apply the overrides (defined as /opt/stackstorm/overrides/_global.yaml) for a specific pack upon installation of it?

@kaluginadaria
Copy link

I agree that the override feature should also be included in other services besides st2client ( i.e. st2actionrunner)
the documentation says that

Upon a pack install or reload resource state is managed as follows:
State is read from the pack’s resource metadata files that reside in /opt/stackstorm/packs/. These are downloaded from the relevant repository of the pack, e.g. GIT, StackStorm-Exchange.

If /opt/stackstorm/overrides/_global.yaml is present, then any global overrides are applied. The _global.yaml allows you to specify the default state of a particular resource types, e.g. disable all sensors. The format of the _global.yaml is as follows (set to disable everything):

However, this does not work when running packs.install or packs.load action from the UI. So docs are misleading...

@cognifloyd
Copy link
Member

How are you defining your overrides? Via the st2.overrides value?
https://github.com/StackStorm/stackstorm-k8s/blob/master/values.yaml#L96-L109

Or are you trying to create files in the st2client pod? If you put files in the st2client pod, they will only be visible to processes (like st2ctl) that you run in that pod. They will not be visible in the st2actionrunner pods which handle the packs.install action (the st2api pods might also read the files).

Also, are you trying to use st2.packs.volumes? https://github.com/StackStorm/stackstorm-k8s/blob/master/values.yaml#L170-L171
Supporting this with st2.packs.volumes probably requires adding another volume at st2.packs.volumes.overrides similar to st2.packs.volumes.virtualenvs so that the files can be appropriately shared across the st2actionrunner and st2api pods.

@cognifloyd cognifloyd added help wanted Extra attention is needed feature st2 Helm labels Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Helm help wanted Extra attention is needed st2
Projects
None yet
Development

No branches or pull requests

3 participants