fix: Manage OIDC admin password secret via cluster_resources#919
fix: Manage OIDC admin password secret via cluster_resources#919
Conversation
ff14bbd to
8a68412
Compare
|
Thanks for the detailed report! The new code always reads in the secret to copy it and to write it out again, which looks a bit silly and actually causes many, many more Secret generations. BTW, we added a shared function to op-rs in stackabletech/operator-rs#1187, which we could use for all this sort of use-cases. Either that is broken (than we should fix it) or it is already there. I'm only on a train right now, but I would be interested in deeper understanding what exactly is the problem, as I fail to see how
|
|
Without having seen the comment from @sbernauer I allowed myself a little refactoring 66a8d96 |
I'm leaving for vacation soon so didn't have time to dig into this deeper, just a few notes:
|
Description
The
oidc-opakuttl test fails consistently for all NiFi 2.x variants because the NiFi pod gets restarted shortly after becoming ready.The OIDC admin password secret was created directly
client.create(). This caused a problem:The commons-op restarter mutating webhook could not see the secret when first computing annotations for the StatefulSet, producing incomplete restarter annotations. The restart controller then detected the missing annotation and patched the StatefulSet, triggering an unnecessary pod restart. In slow CI environments (AKS), the restarted pod took over 5 minutes to come back, exceeding the test's 300s timeout.
So the test proceeded, because the replica was shortly ready, but was then restarted by the restart controller. The restart took quite long in CI and exceeded the test timeout.
We now build the OIDC admin password secret with proper labels and owner references, and apply it through
cluster_resources.add()like other managed resources, which solves the problem by preventing the unnecessary restart.Definition of Done Checklist
Author
Reviewer
Acceptance
type/deprecationlabel & add to the deprecation scheduletype/experimentallabel & add to the experimental features tracker