Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add k8s_namespace() to pull cached namespace #5935

Merged
merged 3 commits into from
Sep 12, 2022

Conversation

nsheaps
Copy link
Contributor

@nsheaps nsheaps commented Sep 9, 2022

This will add a k8s_namespace() function to tiltfiles to allow them to fetch the namespace that tilt is configured to use, regardless of if the kubeconfig changes which namespace or context it's targeted at.

Still needs docs update

Closes #5934

@nsheaps nsheaps force-pushed the nsheaps/add-k8s-namespace branch from a9a0946 to e401a63 Compare September 9, 2022 20:09
Signed-off-by: Nathan Heaps <nathan.heaps@reddit.com>
@nsheaps nsheaps force-pushed the nsheaps/add-k8s-namespace branch from e401a63 to 537a907 Compare September 9, 2022 20:11
@@ -5765,7 +5766,7 @@ type fixture struct {
func (f *fixture) newTiltfileLoader() TiltfileLoader {
dcc := dockercompose.NewDockerComposeClient(docker.LocalEnv{})

k8sContextPlugin := k8scontext.NewPlugin(f.k8sContext, f.k8sEnv)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@nsheaps nsheaps requested a review from kylelemons September 12, 2022 14:29
Signed-off-by: Nathan Heaps <nathan.heaps@reddit.com>
@nsheaps nsheaps force-pushed the nsheaps/add-k8s-namespace branch from af15d86 to e8862ce Compare September 12, 2022 18:31
@nicks
Copy link
Member

nicks commented Sep 12, 2022

lgtm, but the build is failing because you need to run gofmt or goimports?

Signed-off-by: Nathan Heaps <nathan.heaps@reddit.com>
@nsheaps
Copy link
Contributor Author

nsheaps commented Sep 12, 2022

Thanks @nicks , I wasn't paying attention to that check originally because it wasn't running. Will ping for review once CI passes

@nsheaps nsheaps marked this pull request as ready for review September 12, 2022 20:50
Copy link
Member

@nicks nicks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! thanks!

@nicks nicks merged commit 989d4a5 into tilt-dev:master Sep 12, 2022
@nsheaps nsheaps deleted the nsheaps/add-k8s-namespace branch September 12, 2022 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make the namespace from Tilt's k8s client config available in the Tiltfile
3 participants