Skip to content

Write a design doc for a PackContract CRD #210

Open

Description

@dcmcand

Background

Software packs need values from each other at runtime. dask-gateway needs JupyterHub's API token and hub URL. A dashboard needs a database's service name and port. A pack that calls another pack's API needs that pack's OIDC client ID.

Today each of those values is hardcoded in the consumer's chart values, in a spin, or in a composition template. No pack declares what it offers or what it needs, so nothing can check the wiring.

The Crossplane spin PoC in nebari-dev/nebari-infrastructure-core#641 showed what that costs:

  • The composition had to know z2jh's hub Secret key path, data-science-pack's OIDC Secret naming, the operator's client-id convention, dask-gateway's traefik service name, JupyterHub's pod labels, and ports 8786 and 8081. It got the client-id convention wrong, and nothing failed at build or test time.
  • dask-gateway reads the hub token from a Secret in its own namespace. To get the token there from a separate namespace, the PoC copied it into the ArgoCD Application's valuesObject, which puts it in plaintext in etcd, in kubectl get application -o yaml, and in the ArgoCD UI.
  • The composition only rendered the dask-gateway Application after it had read the token. Crossplane garbage-collects what a pipeline stops returning, and the Application had prune: true and the ArgoCD finalizer, so one empty Secret read would have uninstalled dask-gateway.

On 2026-10-15 we decided that a spin is a one-time bootstrap render into the GitOps repo, not a reconciled composition. After bootstrap nothing is in the loop, so a value that changes on day 2 (a rotated token, a renamed client, a new hostname) needs something running in the cluster to carry it to the packs that use it. This is question 1 in nebari-dev/nebari-infrastructure-core#670: how do packs wire to each other?

Scope

Write a design doc in docs/plans/ for a PackContract CRD, reconciled by the operator, that lets a pack declare what it provides to other packs and what it needs from them. The doc goes up as a PR so the team can give feedback there, and merging it closes this issue. Implementation is follow-up work.

The doc needs to answer at least:

  • How does a pack declare the values it provides and the values it needs?
  • How does a secret value reach a consumer in another namespace without a copy anywhere other than a Secret?
  • Who decides whether a consumer may read a producer's secret values?
  • What happens to a consumer when a producer is unavailable, changed, or removed?
  • How does this fit with spins, ArgoCD, and the pack specification?

Related

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Start date

    None yet

    Target date

    None yet

    Size

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions