-
Originally opened by @selfuryon in cuelang/cue#910 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: 1 comment
-
Original reply by @myitcv in cuelang/cue#910 (comment) @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.
Original reply by @myitcv in cuelang/cue#910 (comment)
@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: