-
|
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. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
|
Hi @mnk , thank you for reporting. @xstefank could you pls take a look on this? |
Beta Was this translation helpful? Give feedback.
-
|
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. |
Beta Was this translation helpful? Give feedback.
-
|
for the record adding here the fix pr: #3077 |
Beta Was this translation helpful? Give feedback.
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.