-
Notifications
You must be signed in to change notification settings - Fork 4
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
New feature: Show data in modules #331
Comments
Up until now we have avoided parsing or otherwise accessing puppet's configuration directly. This is great as it allows to run hdm without a running puppet installation, which is handy not just for development purposes imo. So I would propose we handle this as we have done with other comparable settings in the past: We assume the same default as puppet, but allow to override it in From #351 (comment):
Of course it is more complicated than I had anticipated 😂 The new structure that emerged as part of #330 adds a concept of layers, but those layers are quite static: Once you have chosen an environment (which is always the first step in hdm), the global and environment layers are set and will not change. The module layer is a lot more dynamic, though. It depends on the key that is being queried. But not only that, the most important use case of hdm is displaying all keys for a given node. I tend towards the first option in #243 (comment): At least to begin with it will probably make sense to only show keys that have been overridden in the environment or global layer, not every single key available in all modules. This means, the module layer is something different, depending on context. Here is a (possibly incomplete) list:
The code currently pushes most of these operations (or parts there of) to the lowest code layer (basically a single hierarchy as defined in one of the (Sorry for the noise. There is no question in here, I mainly write this down because there is a weekend ahead and I do not want to forget all of this. But if anyone has any remarks anyway, they are very welcome.) |
Only uses the module layer when a key with a namespace matching one of the environment's modules is given. This means that when displaying all keys for a given node, keys in modules will only be shown when they are overwritten in a higher layer.
Only uses the module layer when a key with a namespace matching one of the environment's modules is given. This means that when displaying all keys for a given node, keys in modules will only be shown when they are overwritten in a higher layer.
Discussed in #243
Originally posted by tuxmea December 22, 2023
Request
Solution
Within HDM -> environments -> node -> Key
Check if the selected key first part of the name is a module name by:
modulepath
setting (usemodules
as default, multiple entries are separated by colon:
, can also be absolute path)Puppet.settings('basemodulepath')
Default:
modulepath
directories in order for a directory with the same namehiera.yaml
inside the directoryhiera.yaml
file existsIf module data exist, a button
module
will show up next to the key.Now HDM switches into module data view.
There should be a button
environment
which leads back to the environment data (ideally the one where we switched to module data view).Within the key list, only module data are shown.
The hiera data directory/file structured is build in the same way as we do it now with environment data.
When selecting a key, one sees the same view as in environment data.
The text was updated successfully, but these errors were encountered: