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

GitHub ticket feature skipped if no webhook secret defined #1826

Open
petersutter opened this issue Apr 19, 2024 · 0 comments
Open

GitHub ticket feature skipped if no webhook secret defined #1826

petersutter opened this issue Apr 19, 2024 · 0 comments
Labels
component/dashboard Gardener Dashboard kind/bug Bug

Comments

@petersutter
Copy link
Member

What happened:
The webhookSecret should be optional if pollIntervalSeconds is defined, as also written here

# webhookSecret: foobar # optional if pollIntervalSeconds is defined

However the SyncManager is not started if there is no webhookSecret configured. In this case, informers.leases is not added.

if (config.gitHub?.webhookSecret) {
const informerOpts = { fieldSelector: 'metadata.name=gardener-dashboard-github-webhook' }
const namespace = process.env.POD_NAMESPACE || 'garden'
informers.leases = client['coordination.k8s.io'].leases.informer(namespace, informerOpts)
}

Leases key is not present on informers
if (informers[key]) {
if (key === 'leases') {
watch(this.io, informers[key], { signal: this.ac.signal })
} else {
watch(this.io, informers[key])
}
}
and therefore the watch function is not called (which starts the SyncManager)
watch(this.io, informers[key], { signal: this.ac.signal })

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know:

Environment:

@petersutter petersutter added kind/bug Bug component/dashboard Gardener Dashboard labels Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/dashboard Gardener Dashboard kind/bug Bug
Projects
None yet
Development

No branches or pull requests

1 participant