Skip to content

Commit

Permalink
adding waiting for so-so stability before rolling kafka in kafka node…
Browse files Browse the repository at this point in the history
… pool ST

Signed-off-by: hzrncik <hzrncik@redhat.com>
  • Loading branch information
henryZrncik committed Feb 16, 2024
1 parent d775517 commit d311f3d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ public static Pod mapToPod(Map<String, Object> map) {
}

public static void annotateStrimziPodSet(String namespaceName, String resourceName, Map<String, String> annotations) {
LOGGER.info("Annotating StrimziPodSet {}/{} with annotations: {}", namespaceName, resourceName, annotations);
StrimziPodSetResource.replaceStrimziPodSetInSpecificNamespace(resourceName,
strimziPodSet -> strimziPodSet.getMetadata().setAnnotations(annotations), namespaceName);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,9 @@ void testNodePoolsRolesChanging() {
final KafkaTopic kafkaTopic = KafkaTopicTemplates.topic(testStorage.getClusterName(), testStorage.getTopicName(), 1, 6, testStorage.getNamespaceName()).build();
resourceManager.createResourceWithWait(kafkaTopic);

LOGGER.info("wait for Kafka pods stability");
PodUtils.waitUntilPodStabilityReplicasCount(testStorage.getNamespaceName(), KafkaResource.getStrimziPodSetName(testStorage.getClusterName(), volatileRolePoolName), 3);

LOGGER.info("Start rolling update");
Map<String, String> volatilePoolPodsSnapshot = PodUtils.podSnapshot(testStorage.getNamespaceName(), volatilePoolLabelSelector);
StrimziPodSetUtils.annotateStrimziPodSet(testStorage.getNamespaceName(), KafkaResource.getStrimziPodSetName(testStorage.getClusterName(), volatileRolePoolName), Collections.singletonMap(Annotations.ANNO_STRIMZI_IO_MANUAL_ROLLING_UPDATE, "true"));
Expand Down

0 comments on commit d311f3d

Please sign in to comment.