tilt-dev / tilt-dev/tilt

Can't use a local to generate allowed kube_contexts

Open
#2,269 2 comments 1 reaction 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.