Open adawalli opened 2 years ago
I think I would even consider using a patch copy
command in a pinch, but I don't think you can reference a "required" configs section in that way
@briandealwis - let me know if I need to provide better clarification. Thanks!
This is great @adawalli. We've also heard people wanting to be able to:
Hello, has this been somehow addressed in recent versions? Is there a way to share configuration between modules? E.g. If you have complex tag policy that you want to use in all modules, do you need to copy it to and maintain it across all the modules? Thank you.
Expected behavior
I would expect that blocks of code could propagate or be reused within "required" config modules.
Actual behavior
When trying to break up a large skaffold config file into multiple configs (separate files), some of the reuse opportunities go away. Consider the following "monolith"
In this case, we can build two artifacts that share a common set of docker settings (useDockerCLI and useBuildKit).
As the complexity (and number of artifacts grows), we decide to get fancy and use configs!
Note: In real life, I would have moved child1 and child2 to separate files, but this is just for the sake of simplicty Now, I go to render the output
skaffold diagnose --yaml-only -f skaffold-multi.yaml --module parent
Uh-oh, I can see that the two children aren't using my
local
context for Docker (or my tagging strategy)....since they have their ownbuild
stanzas.Things I have tried (unsuccessfully) as work-arounds
local
context into children configs from parent. Unfortunately, this doesn't work since wildcard contexts aren't supported in JSONPATCHThe only thing I have found that works is to copy the same config options into all of the children configs, which is
false
everywhere?)It's very possible that I am missing something obvious as I am fairly new to Skaffold, so any suggestions would be greatly appreciated!
Information
Steps to reproduce the behavior
please see above