Backport operator secret sequencing fix - #23705
Conversation
|
Its definitely affected, we've been testing with it. I'm happy to look at a more targeted fix, but it would be a different fix to the one in 23.x. I thought it would be cleaner to apply the same fix. I guess its the |
That's generarly true backports should be 1:1. However, in 23 we did more major changes to Operator implementation we want to avoid dragging in back to 22 to limit the risk of regressions in a micro. In this case, I think we need a tailored fix for 22 to keep previous implementation. @shawkins WDYT? |
|
Other than some additional risk, probably the biggest issue for a point release is that this will trigger a rolling restart of the keycloak instance. As long as we're okay with that, then I think the additional risk is worth not having a skew in the implementations. |
You mean upgrading to the micro will cause the restart? It will trigger a restart in any case to roll the new image. I'm not really comfortable with backporting anything this big, especially not now before prod release. I'd rather have a different fix implementation. |
|
OK. I need to fix the tests anyway (I only ran the unit tests, whoops!), so shall I go for an alternative implementation? |
+1 from me |
Just to make sure I'm following you, are you saying that every release of the operator will be accompanied by a different keycloak image? |
Let me ask a question - I thought that the operator <-> operand is 1:1 currently, and every time there is (even a security update) of the operator, it means that there is also updated operand image. For example, UBI9 security updates are there in both operator and operands. So, isn't it that ALWAYS when operator is updated, operand also will be updated, thru the rolling update? Otherwise, the Having said that, what is wrong with the direct backport, i.e. is the only concern due to the rolling update of the operand? |
c70531f to
78821d1
Compare
Yes, the release processes of Operator and Operand are now 100% aligned. We can't release new Keycloak version without releasing a new Operator version and vice versa.
I see the risk in the potential regressions. #21162 significantly changed how we handle watching Secrets. This change has not yet been released in any Keycloak version, just nightlies. We have integration tests of course, but there's always risk we missed something. And from my perspective it's safer to release something like that in a major version than risk breaking stuff in micro release (just before a major prod release). And I see less risk in creating a smaller targeted fix just for #22404. |
…ent (keycloak#22404) * allows normal reconciliation to continue even if secrets are not present Closes keycloak#22170 * adds polling if any secret (in particular optional) is not present Closes keycloak#22170
78821d1 to
14bc5c8
Compare
ghost
left a comment
There was a problem hiding this comment.
Unreported flaky test detected, please review
Unreported flaky test detectedIf the below flaky tests below are affected by the changes, please review and update the changes accordingly. Otherwise, a maintainer should report the flaky tests prior to merging the PR. org.keycloak.testsuite.webauthn.account.WebAuthnTransportLocaleTest#localizationTransportUSBKeycloak CI - WebAuthn IT (chrome) |
|
Looking at the failure on 22.0, it's actually crashing because it can't find the secret and then giving up on reconcile because it crashed too much. I think that's a different cause (although the same symptoms). I have a more targetted fix coming in a second pr, just letting the tests run this time :) |
|
Closing for a more targeted fix for 22.0 in #23741 |
This bug makes scenarios where applying the
KeycloakCR at the same time as theCertificateCR that is expected to generate the secret used by Keycloak will, more often than not, end up in a bad state. This forces bad behaviour like sequencing CRs onto the cluster.We are expecting to use 22.0 with our customers, so would like to backport the fix from #22404 (and #21162 as a dependency)
Fixes #22170