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

kubeconfig does not reload when changed #2123

Open
chuckha opened this issue Aug 27, 2019 · 2 comments
Open

kubeconfig does not reload when changed #2123

chuckha opened this issue Aug 27, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@chuckha
Copy link

chuckha commented Aug 27, 2019

I have a tilt instance up and running with a KUBECONFIG env var set to a valid kubeconfig. I want to reset my cluster and start over from a fresh cluster so I run kubeadm reset and kubeadm init on the node. I then copy down the new /etc/kubernetes/admin.conf kubeconfig and replace KUBECONFIG local file with the contents of the admin.conf file.

Tilt now complains about an x509 error because I have regenerated the CAs which is part of the standard process of kubeadm reset and kubeadm init

I would expect tilt to reload that file and was surprised when I had to kill the process and restart it.

@dbentley
Copy link
Contributor

Ah, thanks. This is good to know.

For context, a lot of how we watch the cluster right now is pretty set at start-up. We don't respond to the context changing at all, and that seems like a good thing.... But.... Hrm. This might not be trivial to fix.

@jazzdan jazzdan added the enhancement New feature or request label Aug 29, 2019
@tclasen
Copy link

tclasen commented Jan 5, 2021

+1 for this issue. In my ideal world I'd like to be able to execute this Tiltfile:

if config.tilt_subcommand == "down":
    local(command="ctlptl delete -f ./deploy/local-dev-cluster.yaml")
    # Force Exit?
else:
    local(command="ctlptl apply -f ./deploy/local-dev-cluster.yaml")
    # Re-auth or restart tilt with a special flag passed in to skip this step
    # Maybe even just a tilt extension that builds the cluster using ctlptl if it doesn't exist?

for app in ["myapp"]:
    docker_build(app, context="./{}/src".format(app), dockerfile="./{}/deploy/Dockerfile".format(app))
    k8s_yaml("./{}/deploy/k8s.yaml".format(app))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants