tilt-dev / tilt-dev/tilt

Kustomize SecretGenerator sources are not watched

Open
#5,946 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Go
Stars
10.1k
Forks
413
Avg merge
1d 10h
Merged PRs (30d)
6

Description

Expected Behavior

Changes to files loaded into secrets by Kustomize's SecretGenerator should trigger a rebuild.

Current Behavior

Changes to files loaded by SecretGenerator require a manual update to propagate.

Steps to Reproduce
  1. Create a Kustomization directory with a test file, e.g. foo.txt, and a kustomization.yml containing a secretGenerator block that loads foo.txt into a secret.
  2. Create a minimal Tiltfile with k8s_yaml(kustomize('kustomize')).
  3. Run tilt up.
  4. Run tilt get filewatches -o yaml. foo.txt should not show up here.
  5. Add a line to foo.txt and inspect the content of the corresponding secret.
Context
tilt doctor Output
$ tilt doctor
Tilt: v0.30.8, built 2022-09-19
System: linux-amd64
---
Docker
- Host: unix:///var/run/docker.sock
- Server Version: 20.10.17
- API Version: 1.41
- Builder: 2
- Compose Version: v2.10.2
---
Kubernetes
- Env: docker-desktop
- Context: docker-desktop
- Cluster Name: docker-desktop
- Namespace: default
- Container Runtime: docker
- Version: v1.24.1
- Cluster Local Registry: none
---
Thanks for seeing the Tilt Doctor!
Please send the info above when filing bug reports. 💗

The info below helps us understand how you're using Tilt so we can improve,
but is not required to ask for help.
---
Analytics Settings
--> (These results reflect your personal opt in/out status and may be overridden by an `analytics_settings` call in your Tiltfile)
- User Mode: opt-in
- Machine: e998586f69eb7d0472a5300ac21fe30c
- Repo: I3DrgEYlqG9pJO3pOGu8bw==
About Your Use Case

I looked at the code and it seems only ConfigMapGenerators are added. Is this intentional?
https://github.com/tilt-dev/tilt/blob/ac882d4b6ab3c671de407e6413ae96fe6d2a8570/internal/kustomize/dependencies.go#L70-L122

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

Start with internal/kustomize/dependencies.go, especially lines 70-122, and reproduce the issue using a Kustomization with a secretGenerator and a Tiltfile calling k8s_yaml(kustomize('kustomize')). Compare the existing ConfigMapGenerator handling with SecretGenerator behavior; done means changes to foo.txt appear in file watches and update the corresponding secret.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
devops, infrastructure
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.