Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import io.javaoperatorsdk.operator.processing.event.source.EventSource;

import static io.javaoperatorsdk.operator.sample.Utils.*;
import static io.javaoperatorsdk.operator.sample.WebPageManagedDependentsReconciler.SELECTOR;

/**
* Shows how to implement reconciler using standalone dependent resources.
Expand All @@ -27,6 +28,7 @@ public class WebPageStandaloneDependentsReconciler
implements Reconciler<WebPage>, ErrorStatusHandler<WebPage>, EventSourceInitializer<WebPage> {

public static final String DEPENDENT_RESOURCE_LABEL_SELECTOR = "!low-level";

private static final Logger log =
LoggerFactory.getLogger(WebPageStandaloneDependentsReconciler.class);

Expand Down Expand Up @@ -85,7 +87,7 @@ private void createDependentResources(KubernetesClient client) {
Arrays.asList(configMapDR, deploymentDR, serviceDR, ingressDR).forEach(dr -> {
dr.setKubernetesClient(client);
dr.configureWith(new KubernetesDependentResourceConfig()
.setLabelSelector(DEPENDENT_RESOURCE_LABEL_SELECTOR));
.setLabelSelector(SELECTOR + "=true"));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was the tests working if the selector was wrong?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since those were not mutal exclusive, the other selector is about not having a label what was true.

});
}

Expand Down