Skip to content

Including external module dependencies in existing timoni module #449

Answered by rrmistry
rrmistry asked this question in Q&A
Discussion options

You must be logged in to vote

After some more deliberations and looking at GetBundle in internal/engine/bundle_builder.go and how it is used in cmd/timoni/bundle_build.go, it feels that the CUE configuration is preferred at the bundle level, and the --namespace flag has no effect.

So the cleanest solution now is to utilize some CUE and timoni techniques to allow the namespace to be configurable at the bundle level.

With below file:

// ./bundles/podinfo.cue
bundle: {
    ...
    // Same as before but with a small change
    _namespace: string | *"default" @timoni(runtime:string:NAMESPACE)
    ...
}

// ----------------------------------------------------------------------------

// ./bundles/team_a.cue
bundle: {
    ..…

Replies: 2 comments 8 replies

Comment options

You must be logged in to vote
8 replies
@rrmistry
Comment options

@salotz
Comment options

@rrmistry
Comment options

@rrmistry
Comment options

Answer selected by rrmistry
@salotz
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants