Can't use a local to generate allowed kube_contexts
Open
Nobody has claimed this yet.
bug
- Dominant language
- Go
- Stars
- 10.1k
- Forks
- 413
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 6
Description
This Tiltfile errors, when ideally it should be allowed:
allowed = local("echo 'my-custom-cluster'")
allowed_k8s_contexts(allowed)
Running it results in:
Error: Refusing to run 'local' because my-custom-cluster
might be a production kube context.
If you're sure you want to continue add:
allow_k8s_contexts('my-custom-cluster')
before this function call in your Tiltfile. Otherwise, switch k8s contexts and
restart Tilt.
cc @omrikiei
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the error with the shown Tiltfile, then trace the allowed_k8s_contexts and local entry points that produce the refusal. Done means the snippet can use the local result as an allowed context without the reported error, with the existing safety behavior preserved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- cli, devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100