upbound / up

The @upbound CLI
Apache License 2.0
49 stars 42 forks source link

Get ingress host and CA from space through connect #535

Closed RedbackThomson closed 1 month ago

RedbackThomson commented 1 month ago

Description of your changes

Closes https://github.com/upbound/team-orchestration/issues/99

Instead of connecting directly to the space using its FQDN and with skipping TLS, query the space through connect to get the ingress host and CA data. This allows for a TLS-secured connection to the space, and unlocks the ability to connect to "connected spaces" (assuming their host is accessible).

With the requirement to pass a context writer and now an ingress reader to a lot of different methods, I decided to wrap these into a new "context" object (navCtx) to make things cleaner - rather than passing many args into every method.

I have:

How has this code been tested

Blocked on testing in dev until https://github.com/upbound/spaces/pull/1067 is merged, but tested using stubbed responses.