@Test public void testNeedsRollingUpdateReadinessTimeout() { a.getSpec().getTemplate().getSpec().getContainers().get(0).getReadinessProbe().setTimeoutSeconds( a.getSpec().getTemplate().getSpec().getContainers().get(0).getReadinessProbe().getTimeoutSeconds() + 1); assertThat(ZookeeperSetOperator.needsRollingUpdate(diff()), is(true)); }
public static boolean needsRollingUpdate(StatefulSetDiff diff) { if (diff.changesLabels()) { log.debug("Changed labels => needs rolling update"); return true; } if (diff.changesSpecTemplate()) { log.debug("Changed template spec => needs rolling update"); return true; } if (diff.changesVolumeClaimTemplates()) { log.debug("Changed volume claim template => needs rolling update"); return true; } if (diff.changesVolumeSize()) { log.debug("Changed size of the volume claim template => no need for rolling update"); return false; } return false; }
ZookeeperSetOperator extends StatefulSetOperator { public static boolean needsRollingUpdate(StatefulSetDiff diff) { if (diff.changesLabels()) { log.debug("Changed labels => needs rolling update"); return true; } if (diff.changesSpecTemplate()) { log.debug("Changed template spec => needs rolling update"); return true; } if (diff.changesVolumeClaimTemplates()) { log.debug("Changed volume claim template => needs rolling update"); return true; } if (diff.changesVolumeSize()) { log.debug("Changed size of the volume claim template => no need for rolling update"); return false; } return false; } }
ZookeeperSetOperator extends StatefulSetOperator { public static boolean needsRollingUpdate(StatefulSetDiff diff) { if (diff.changesLabels()) { log.debug("Changed labels => needs rolling update"); return true; } if (diff.changesSpecTemplate()) { log.debug("Changed template spec => needs rolling update"); return true; } if (diff.changesVolumeClaimTemplates()) { log.debug("Changed volume claim template => needs rolling update"); return true; } if (diff.changesVolumeSize()) { log.debug("Changed size of the volume claim template => no need for rolling update"); return false; } return false; } ZookeeperSetOperator(Vertx vertx, KubernetesClient client, ZookeeperLeaderFinder leaderFinder, long operationTimeoutMs); }
ZookeeperSetOperator extends StatefulSetOperator { public static boolean needsRollingUpdate(StatefulSetDiff diff) { if (diff.changesLabels()) { log.debug("Changed labels => needs rolling update"); return true; } if (diff.changesSpecTemplate()) { log.debug("Changed template spec => needs rolling update"); return true; } if (diff.changesVolumeClaimTemplates()) { log.debug("Changed volume claim template => needs rolling update"); return true; } if (diff.changesVolumeSize()) { log.debug("Changed size of the volume claim template => no need for rolling update"); return false; } return false; } ZookeeperSetOperator(Vertx vertx, KubernetesClient client, ZookeeperLeaderFinder leaderFinder, long operationTimeoutMs); static boolean needsRollingUpdate(StatefulSetDiff diff); @Override Future<Void> maybeRollingUpdate(StatefulSet sts, Function<Pod, List<String>> podRestart, Secret clusterCaSecret, Secret coKeySecret); }
ZookeeperSetOperator extends StatefulSetOperator { public static boolean needsRollingUpdate(StatefulSetDiff diff) { if (diff.changesLabels()) { log.debug("Changed labels => needs rolling update"); return true; } if (diff.changesSpecTemplate()) { log.debug("Changed template spec => needs rolling update"); return true; } if (diff.changesVolumeClaimTemplates()) { log.debug("Changed volume claim template => needs rolling update"); return true; } if (diff.changesVolumeSize()) { log.debug("Changed size of the volume claim template => no need for rolling update"); return false; } return false; } ZookeeperSetOperator(Vertx vertx, KubernetesClient client, ZookeeperLeaderFinder leaderFinder, long operationTimeoutMs); static boolean needsRollingUpdate(StatefulSetDiff diff); @Override Future<Void> maybeRollingUpdate(StatefulSet sts, Function<Pod, List<String>> podRestart, Secret clusterCaSecret, Secret coKeySecret);  }