-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Support in data merging strategy for salt.modules.config.get like in pillar.stack #56187
Comments
salt.modules.config.get
like in pillar.stack
Hi @baby-gnu thanks for the request - I've added it to our core team agenda and should be able to get back to you on Friday! |
Hey @baby-gnu - could you elaborate on what you actually need here? Typically configs should be relatively static and straightforward. Most dynamic behaviors can be specified with data in pillars. What is the killer use-case here that can't be accomplished with pillars? |
Hello @waynew.
My feature request is to add merging capabilities to pillars (and anything queryable by When writing formulas, the author can choose the merging strategy of the I want to be able to define fine-grained merging strategies for my config, pillars, grains, … directly in the data (not in the code using the For the context, in the formulas community, we are looking for minimizing the use of pillars since it can be quite costly on the master (this is a common complain against the formulas which abuse of pillars). This formula proposal use strategy: recurse
merge_list: true
values:
key1: value1
key2:
subkey2:
- 1
- 2
- 3 This feature request ask for the possiblity to define pillars, grains, etc. like: __: merge-first
key1: value1
key2:
subkey2:
- '__': 'merge-last'
- 1
- 2
- 3 With more fine-grained merging policies. I think it's better to implement this in Regards. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue. |
Do you need more information for this feature request? |
Thank you for updating this issue. It is no longer marked as stale. |
@baby-gnu Sorry for the wait, things have been a bit crazy this past month for everyone. I'll make sure it's on our agenda for this week! |
Thanks @waynew, seems things had been really crazy ;-) |
A similar feature request to #61141 which we've determined we do not want to support at this time. |
Description of Issue
salt.modules.config.get
support merging strategy at call time with themerge
parameter.This is great for
sls
writer to decide how to use things but I think it should be better to make it a data driven behaviour like it's done in pillar.stackThis could be implemented at several levels but as the
salt.modules.config.get
usesalt.utils.dictupdate.merge
(usingsalt.utils.dictupdate.update
for therecursive
andoverwrite
strategies) it could be interesting to implement this insalt.utils.dictupdate
forsalt.slsutil
to benefit from it.Setup
(Please provide relevant configs and/or SLS files (Be sure to remove sensitive info).)
Steps to Reproduce Issue
(Include debug logs if possible and relevant.)
Versions Report
(Provided by running
salt --versions-report
. Please also mention any differences in master/minion versions.)The text was updated successfully, but these errors were encountered: