Comments (5)
hmmmmm....i was not able to reproduce the behavior you're describing. But I think there's a bit of confusion about the expected behavior. Here's what I tried:
- Created two kind clusters
- Ran
kubectl config use-context kind-a
- Checked out the example project at https://github.com/tilt-dev/tilt-example-html/tree/master/0-base
- Ran
tilt up
- Ran
kubectl config use-context kind-b
- Made a change to the image
- Verified that the image was deployed to kind-a
The behavior I would expect is that Tilt reads the kubeconfig at startup, and continues to deploy to the same cluster, even if your current context changes.
Do you have additional repro steps?
from tilt.
Unfortunately after playing around a bunch I also can't reproduce the bug.
To fill in some additional defails.
- Starting tilt with the remote cluster as context yields the expected error due to beeing potentially on production.
-> I could not have started tilt by accident on the affected cluster as it would not have applied anything. I am certain the allowed context is and was docker-desktop as I did not change that at all. Also docker-desktop is the local cluster and not some sadistic rename. - This happened after my laptop was suspended for around 14 hours.
- Parts of tilt were likely building a container and a local helm chart was likely reinstalled, because the affected file was not in the .helmignore or .dockerignore
To me this feels like a very weird race condition. I am not familiar with the codebase, but do you know how tilt handles the context internally? Are kubectl commands always applied with a pinned context?
At some point tilt must have switched the context even skipping the k8s_context validation.
from tilt.
Is tilt maybe working with tokens to authenticate to the api and because >14h passed, it expired and it had to renew it bypassing the checks and using the current-context?
from tilt.
tilt reads the kubeconfig at startup, minifies it (removing all the other kube contexts), writes a new minified kubeconfig to a different place on disk, and uses that one for all future connection settings. If you run tilt get cluster -o yaml
, you can see what it's using.
from tilt.
The config it writes to:
tilt get cluster -ojsonpath='{.items[*].status.connection.kubernetes.configPath}'
is not used by tilt itself? When deleting it tilt still works.
There is a config at ~/.tilt-dev though and even deleting that does not prevent tilt from talking to the cluster. There has to be some in memory state.
Shooting in the dark here, but the long time between the tilt updates and communication with the apiserver is probably key to this. Maybe there is some broken error handling when reestablishing a connection?
from tilt.
Related Issues (20)
- Docker compose profiles set to * doesn't work HOT 5
- Tilt tries to push to docker registry when used with rootless docker + minikube HOT 4
- livenessProbeProbe returns Connection Refused HOT 1
- [Bug] Unable to call commands on host from within `workload_to_resource_function` method HOT 2
- Override auto_init for `tilt ci` HOT 2
- Feature Request: Support Gitlab subgroups within an extension repo's URL HOT 2
- When specifying a deployment namespace with `tilt up --namespace <NAMESPACE>`, if `<NAMESPACE>` does not currently exist, create the namespace. HOT 4
- Make it Scoopable HOT 1
- How to Starlark here to config it? HOT 1
- missing argument for echo_off HOT 1
- split service from workload resource
- Graceful shutdown is ignored by Tilt HOT 3
- tty in local_resource kills tilt HOT 2
- Log pane scrolls to top when truncating
- live update doesn't work with jobset HOT 2
- ability to wait on crd deletion before deleting operator
- tty in node in local_resource kills tilt
- Cluster status error since 0.33.9 with eks cluster HOT 3
- dockerignore with globs creates empty folders HOT 1
- Docker Push not skipped when using Docker Desktop 4.31 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tilt.