Repository navigation
Description
Spike partner to #566 (spins tooling ergonomics). That one exercises the spin tooling; this one looks at the composition unit underneath it: a pack of packs - a parent software pack that declares other packs as Helm chart dependencies and owns the wiring between them.
Summary
The question I want answered: can a parent pack compose child packs and wire their values together using only native k8s primitives (Secrets, ConfigMaps, install ordering), without a bespoke value-passing layer?
Background/motivation
We want to ship pre-integrated pack combinations while keeping the base composable. The motivating pair is Nebi + the data science pack, which genuinely have to be configured together. The most obvious direction is a new pack that keeps the others as dependencies - so this spike is to find out where that breaks before we commit to it.
The approach I want to test is that packs don't communicate directly. On a shared cluster, they coordinate through a common medium - an ordered pack creates a named Secret/ConfigMap, and a later pack references it by name. No NIC-side value bus. That's convention-based wiring (#175) applied at the pack-of-packs level.
flowchart TD
subgraph PoP["Pack of packs"]
subgraph Packs["Packs"]
A["Child pack A<br/>(e.g. Nebi)"]
B["Child pack B<br/>(e.g. Data Science)"]
end
subgraph Comm["Communal space"]
RA[("pack-a outputs")]
RB[("pack-b outputs")]
end
A -->|publishes| RA
RA -->|consumed by| B
B -->|"publishes (optional)"| RB
RB -->|consumed by| A
end
Spins would reference a pack of packs and layer infra/hardware config on top - related but separate, and out of scope here.
Scope
A throwaway parent pack that installs two child packs pre-wired and deploys cleanly end-to-end:
- Parent pack declares the child packs as Helm dependencies (app-of-apps, see Software packs: ArgoCD project and app-of-apps templates #178).
- Ordering enforced so the upstream Secret/ConfigMap exists before the downstream pack mounts it.
- One real cross-pack value actually flowing through that path.
Questions I want answered
- Namespaces. One namespace for the whole pack of packs, or child packs in separate namespaces with cross-namespace resource grants? The resource-grant path should work (scoped to the consuming pod), and IMO that's the better option for organizations - I want to confirm it holds here.
- Ordering. How do we express the dependency? Is ArgoCD sync-wave ordering enough, or do we need something in the parent chart / the
NebariAppCRD? - Does the
NebariAppCRD need to expose more for child packs to discover each other's outputs, or is naming-by-convention enough? - Scalability. How badly does the customization surface grow as packs are added? Is per-combination specificity acceptable, or a dead end?
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Start date
Target date
Size
Activity
viniciusdc commentedon Aug 6, 2026
How DSP wires Nebi today is the consumer-hardcodes-the-companion shape. There's a
nebi:values block in DSP that looks like this right now:Everything derives from a single anchor (
keycloak.hostname) plus that naming convention, the values get bridged intoc.JupyterHub.custom, and a python config file (03-nebi-envs.py) reads them and injects into the singleuser env at spawn. Plus two additive NetworkPolicies (hub->nebi egress, singleuser->gateway egress). It works, but DSP is the one carrying knowledge of its sibling.Another third case might be dask-gateway-pack + DSP (data-science-pack), layered on the Nebi+DSP pair.
In the dask-gateway case, It's the pack that gives JupyterHub users on-demand Dask clusters: a notebook calls
Gateway()and gets a multi-tenant scheduler/worker cluster back. For that to work, the singleuser pod has to know the gateway's address and how to authenticate to it, so it's a genuine second consumer of the same hub, wired the same way Nebi is. That makes it the natural test of whether this composition holds past two packs (the "grows per pack" question), and it carries one twist Nebi doesn't (auth model, below).Adding dask-gateway the same way means a second hardcoded block,
daskGateway:, derivingtraefik-<release>.<ns>.svcand injectingDASK_GATEWAY__*the same way. It would be a near-mirror of thenebi:block above:Third pack, third block. That's the customization surface growing linearly with siblings, and it all lands in DSP.
The communal-space version of this exact case is cleaner. dask-gateway-pack publishes a ConfigMap, say
dask-gateway-connection, with{address, proxyAddress, publicAddress, authMode}. DSP runs one generic injector that reads any connection ConfigMap by a well-known name + schema and injects the env. The only thing both sides agree on is the ConfigMap name and its schema, not every field of every sibling. DSP stops growing a block per pack and grows one consumer once.On the spike's questions, from this case:
One reciprocity wrinkle worth calling out, because it's not just address-passing. Classic dask-gateway used JupyterHub-token auth, which couples the gateway back to the hub API with a shared token, so it's a two-way dependency, not a one-way publish. Nebi sidesteps that by authenticating against Keycloak/OIDC with no hub dependency at all. If dask-gateway did the same it becomes a hub-independent peer and the wiring stays one-way (publish address, done). Should gateway-style packs be nudged toward OIDC instead of hub-token auth so the coupling stays unidirectional?
Verified the DSP<->nebi mechanism against the live 0.1.1 chart and a running cluster, and confirmed the dask-gateway service names/ports/auth on a live deploy, so the shapes above are real, not from the docs.
marcelovilla commentedon Aug 20, 2026
I've been looking into this for the past few days and have gathered some thought here.
I think the composition layer shouldn't be a parent Helm chart (like this issue originally suggests), nor it should be install-time codegen either (like #549 suggest). It should be a composition object evaluated by an existing engine, such as Crossplane or kro. I'll outline the reasons behind this:
CompositeResourceDefinition(XRD) andComposition, which would allow spin authors to easily compose software packs and arbitrary resources. Kro has aResourceGraphDefinition(RGD), a similar concept that allows authors to compose multiple resources. In contrast, neither an Umbrella chart nor using an App of Apps pattern (I think the issue conflates the two of them) are really helpful for composition. An umbrella chart can template the shared resources, but everything lands in one release. Subcharts share the parent's namespace unless every chart templates its own, and upgrading or removing one pack becomes an operation on the parent chart. An App of Apps pattern or an ApplicationSet would fix that by having different applications and separate namespaces, but they only allow specifying Application resources. Shared resources have to go somewhere else, such as a git directory of static manifests with one more Application pointing at it. Things like a PVC's size, namespaces, and claim names would need to be hardcoded in files, repeated in each pack's values, and kept in sync by hand.ConfigMaporSecretafter it has been created. Crossplane offers similar functionality with required resources, allowing compositions to access values in aConfigMap(or any resource, for that matter) from within a function. It seems either approach satisfies the "communal space" approach that @viniciusdc proposes.Regarding the one software pack per namespace convention that we seem to want to follow, I found one caveat in the Crossplane docs:
Regardless of the mechanism we choose for the composition layer, I still think software packs need to have stable values paths a composer can set. Whatever creates the shared resources can only reach a pack through its Helm values. If a spin creates a PVC and needs the data science pack to mount it, that only works if the chart has something like
sharedStorage.existingClaimwired through to the pod spec. This is work that needs to happen at the software pack level.As part of the research spike, I want to build a PoC using either Crossplane or kro (or maybe both) and see how it would work, the authoring ergonomics, and think about the publishing process. We're planning to have a set of curated spins but we also want to allow the community to create and share their own spins.