|
When trying to upgrade to version 5.2, I am facing problems problems with failing integration tests (LocallyRunOperatorExtension). One problem is that the call to After fixing that, I am still facing the issue that the reconciler is not executed. Here is a simple example: public class ConfigMapReconciler implements Reconciler<ConfigMap> {
String configMapName;
@Override
public UpdateControl<ConfigMap> reconcile(ConfigMap resource, Context<ConfigMap> context) throws Exception {
configMapName = resource.getMetadata().getName();
return UpdateControl.noUpdate();
}
}and test @EnableKubeAPIServer
class ConfigMapReconcilerTest {
private ConfigMapReconciler configMapReconciler = new ConfigMapReconciler();
@KubeConfig
static String kubeConfigYaml;
@RegisterExtension
LocallyRunOperatorExtension operator = LocallyRunOperatorExtension.builder()
.withReconciler(configMapReconciler)
.withInfrastructureKubernetesClient(new KubernetesClientBuilder()
.withConfig(Config.fromKubeconfig(kubeConfigYaml))
.build())
.waitForNamespaceDeletion(false)
.build();
@Test
void test() {
operator.create(new ConfigMapBuilder().withNewMetadata().withName("test").withNamespace(operator.getNamespace()).endMetadata().build());
await("Reconciler called")
.pollInterval(50, TimeUnit.MILLISECONDS)
.atMost(10, TimeUnit.SECONDS)
.until(() -> configMapReconciler.configMapName, Objects::nonNull);
}
}This works with 5.1.5 but fails with 5.2.0. Any help appreciated. |
Answered by
xstefank
Dec 1, 2025
Replies: 3 comments
|
Thanks @mnk, we are missing the use of the correct client somewhere. But for now, you can workaround this issue with: I need to finish something else with higher priority now but I'll take a look asap. |
0 replies
Answer selected by
mnk
|
for the record adding here the fix pr: #3077 |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks @mnk, we are missing the use of the correct client somewhere. But for now, you can workaround this issue with:
I need to finish something else with higher priority now but I'll take a look asap.