-
Hello! I have a question about how do you manage common configurations in cue?
I have imported mettalb yaml to cue and I want to add metallb in all environments. Metallb consist of many items like serviceAccounts, daemonSets so I want to manage it only from one place (don't put it in each environment), but it also need personal configmap for each envs.
2nd: import all resources personally:
The second approach is a bit weird, but I don't know the first is ok and someone uses this approach or not because it's a bit hacky too |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
@selfuryon apologies for the delay in replying to your question. Either will work, the embedding in approach 1 is "cleaner" in my opinion. If
Gives the output:
This obviates the need to import |
Beta Was this translation helpful? Give feedback.
-
This discussion has been migrated to cue-lang/cue#910. For more details about CUE's migration to a new home, please see cue-lang/cue#1078. |
Beta Was this translation helpful? Give feedback.
@selfuryon apologies for the delay in replying to your question.
Either will work, the embedding in approach 1 is "cleaner" in my opinion.
If
metallb
is indeed common to all sub-instancesenv1
,env2
andenv3
, another approach is to move the definition ofmetallb
to the parent directory. Here's a rough example:Gives the output: