Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Watch ConfigMaps/Secrets referenced in HelmReleases #1086

Open
jan-kantert opened this issue Oct 9, 2024 · 1 comment
Open

Watch ConfigMaps/Secrets referenced in HelmReleases #1086

jan-kantert opened this issue Oct 9, 2024 · 1 comment

Comments

@jan-kantert
Copy link

jan-kantert commented Oct 9, 2024

For performance (less dry-runs) and latency reasons (small queue and faster updates) it would be great if helm-operator would watch its referenced configmaps/secrets and trigger a reconcile on helmreleases. Basically the same as (closed) #143 or the (closed) #42. Any chance to get this eventually?

@stefanprodan
Copy link
Member

This is not something that could be done for helm-controller only, if we're adding watchers for Secrets/ConfigMaps they should apply to all Flux controllers with custom resources that have refs, but I'm not considering dynamic watchers. Instead we could add watchers to all Flux controllers based on a predefined label that users should add to the Secrets/ConfigMaps e.g. toolkit.fluxcd.io/watch: enabled. In each controller we would create custom indexes based on the ref type/name/namespace similar to:

if err := mgr.GetFieldIndexer().IndexField(ctx, &v2.HelmRelease{}, v2.SourceIndexKey,
func(o client.Object) []string {
obj := o.(*v2.HelmRelease)
namespacedName, err := getNamespacedName(obj)
if err != nil {
return nil
}
return []string{
namespacedName.String(),
}
},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants