Skip to content

Commit

Permalink
add mm resource labelselector
Browse files Browse the repository at this point in the history
Signed-off-by: jkalinic <jkalinic@redhat.com>
  • Loading branch information
jankalinic committed Feb 15, 2024
1 parent d00288e commit c83dffc
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import io.strimzi.api.kafka.Crds;
import io.strimzi.api.kafka.model.mirrormaker.KafkaMirrorMaker;
import io.strimzi.api.kafka.model.mirrormaker.KafkaMirrorMakerList;
import io.strimzi.operator.common.model.Labels;
import io.strimzi.systemtest.enums.CustomResourceStatus;
import io.strimzi.systemtest.resources.ResourceManager;
import io.strimzi.systemtest.resources.ResourceType;
Expand Down Expand Up @@ -60,9 +61,9 @@ public static void replaceMirrorMakerResourceInSpecificNamespace(String resource

public static LabelSelector getLabelSelector(String clusterName, String componentName) {
java.util.Map<String, String> matchLabels = new java.util.HashMap<>();
matchLabels.put(io.strimzi.operator.common.model.Labels.STRIMZI_CLUSTER_LABEL, clusterName);
matchLabels.put(io.strimzi.operator.common.model.Labels.STRIMZI_KIND_LABEL, KafkaMirrorMaker.RESOURCE_KIND);
matchLabels.put(io.strimzi.operator.common.model.Labels.STRIMZI_NAME_LABEL, componentName);
matchLabels.put(Labels.STRIMZI_CLUSTER_LABEL, clusterName);
matchLabels.put(Labels.STRIMZI_KIND_LABEL, KafkaMirrorMaker.RESOURCE_KIND);
matchLabels.put(Labels.STRIMZI_NAME_LABEL, componentName);

return new LabelSelectorBuilder()
.withMatchLabels(matchLabels)
Expand Down

0 comments on commit c83dffc

Please sign in to comment.