upbound / up

The @upbound CLI
Apache License 2.0
52 stars 41 forks source link

ctx: Add space name to kubeconfig extension #561

Closed adamwg closed 3 months ago

adamwg commented 3 months ago

Description of your changes

Previously, we parsed the ingress URL to determine the name of the Space when deriving initial state. This was correct for cloud spaces, but not for connected spaces, since they use a URL starting with proxy..

Add the name of the space to our kubeconfig extension and use it as the space name when deriving state if it's present. If it's not present, fall back to the old behavior (in case anyone has a pre-existing kubeconfig with the old extension in it).

Fixes #557

I have:

How has this code been tested

Added/updated unit tests to cover the new code paths, and tested manually with cloud, connected, and disconnected Spaces.