Repository navigation
Crossplane Spin PoC - #641
marcelovilla wants to merge 43 commits into
Conversation
gateway being published on host ports and its address at the same time
…reattach a stranded test comment
on the gitops repo
|
Hey Marcelo, The hub NetworkPolicy one does look like a real DSP bug and doesn't look like it is filed yet. I confirmed the mechanism statically against z2jh 4.4.0: the hub netpol admits http only from pods labelled hub.jupyter.org/network-access-hub: "true" (templates/hub/netpol.yaml:39-46), and the hub pod itself only carries network-access-proxy-api, network-access-proxy-http and network-access-singleuser (templates/hub/deployment.yaml:22-24), so jhub-apps calling the hub API through the Service is an unlabelled source. What I could not check without a cluster is the runtime behavior, since CNIs vary on whether pod-to-self hairpin traffic is policy-evaluated at all. You have the kindnetd repro, so would you file it against data-science-pack? |
|
Hey @dcmcand, thanks for looking into it. Yes, the multi-arch images are already in place for both packs and I'm just waiting on a release to upgrade them and get rid of the overrides. Regarding the hub network workaround, I did not file a bug because I realized nebari-dev/data-science-pack#205 was already addressing it to be able to deploy locally for the previews. See this comment for more context: nebari-dev/data-science-pack#205 (comment) |
|
Marcelo, thanks for this PoC. I know you put a lot of work into it, and I personally learned a lot from it. I've opened #670 proposing a different approach, based on your work here and James's work in #549. We can discuss it in our team meeting and see which way we want to go. Nothing here closes this PR. |
|
This pull request has had no activity for 30 days, so it has been labeled It will close automatically in 7 days unless something happens. A comment or a push resets the clock. If this pull request should stay open regardless, for example long-running design work or something blocked upstream, add the Closing is not final. The branch is kept, and the pull request can be reopened. |
|
Closing given the consensus reached on #670 (comment) |
Closes
Part of #551
Description
This PR implements a data science spin PoC using Crossplane composition via a control plane project. The spin consists of the following software packs:
This PoC aims to showcase composition at three different levels:
domainfield and inject each pack's info (namespace, release name, service URLs) into the siblings that need them, referenced by the same variables in a single place (i.e., the composition).z2jh, part of the data science pack, creates an API token stored in thehubsecret, which is then read and injected as part of the helm values passed in the dask gateway pack asgateway.auth.jupyterhub.apiToken.NetworkPoliciesare created so that user pods can communicate with the dask scheduler, and so pods from dask gateway can hit the hub API.The composition logic is written in templated yaml (see
examples/crossplane/datascience-spin/functions/render-applications/01-compose.yaml.gotmpl) but could also be written in Python, Go, or KCL.The control plane project was built and pushed to quay.io using the
crossplaneCLI via:The repo is specified in
examples/crossplane/datascience-spin/crossplane-project.yamlHow to Test
nicoff this branchnic deployexamples/crossplane/spin.yamlto the gitops repo and commitdaskenvironment as kernelYou should see a 42, the result of the submitted lambda, ran by a worker.
Temporary setup script
While deploying this locally, I hit some hiccups that are not related to the spin itself, but rather to some of the different components interacting here. To make sure the software packs not only deploy but are also usable, you'll need to:
Until those issues have been addressed, you can run the following script (assuming your domain is
nebari.lvh.me):