-
Notifications
You must be signed in to change notification settings - Fork 28
Closed
Description
Problem
There are edgecases that fail silently during project registration initialization and as well inconsistent behaviour in label handling in the HPO namespace controller.
The problem is control flow based:
- This code must run whether or not we're in a valid
project-registrationnamespace- for label cleanup
- for enforcing label correctness -- i.e. projectId's must match between implementation
upstream project labels& HPO project labels
That code block on considers a hardcodedfield.cattle.io/projectId- It returns
nilon error, which means it does not fail loudly in the initialization block- This is important because resource conflicts from users/ other controllers updating namespaces will fail silently on initialization -- a race condition!
err := h.initProjectRegistrationNamespaces()
if err != nil {
logrus.Fatal(err)
}- The initialization list is updated after this function is called (for good reason!), so we are not guaranteed to have our
projectRegistrationTrackertrack the correct namespaces after the above initialization block under two conditions- k8s object resource conflicts (or, less importantly, intermittent apiserver issues)
a non-standardfield.cattle.io/projectIdlabel is being used by end-users
Testcase
A typical regression test of prometheus-federator should suffice to check the changes
Reactions are currently unavailable