Kustomize SecretGenerator sources are not watched
Nobody has claimed this yet.
- 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
- Create a Kustomization directory with a test file, e.g. foo.txt, and a
kustomization.ymlcontaining asecretGeneratorblock that loadsfoo.txtinto a secret. - Create a minimal Tiltfile with
k8s_yaml(kustomize('kustomize')). - Run
tilt up. - Run
tilt get filewatches -o yaml.foo.txtshould not show up here. - Add a line to
foo.txtand 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
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
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