kengtin commented on code in PR #1053:
URL:
https://github.com/apache/flink-kubernetes-operator/pull/1053#discussion_r2709762273
##########
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/controller/bluegreen/BlueGreenDeploymentService.java:
##########
@@ -109,13 +110,38 @@ public UpdateControl<FlinkBlueGreenDeployment>
initiateDeployment(
*/
public UpdateControl<FlinkBlueGreenDeployment> checkAndInitiateDeployment(
BlueGreenContext context, BlueGreenDeploymentType
currentBlueGreenDeploymentType) {
+
BlueGreenDiffType specDiff = getSpecDiff(context);
if (specDiff != BlueGreenDiffType.IGNORE) {
FlinkDeployment currentFlinkDeployment =
context.getDeploymentByType(currentBlueGreenDeploymentType);
- if (isFlinkDeploymentReady(currentFlinkDeployment)) {
+ if (specDiff == BlueGreenDiffType.SUSPEND &&
currentFlinkDeployment != null) {
+ setLastReconciledSpec(context);
+ LOG.info(
+ "In-place suspension for '{}'",
+ currentFlinkDeployment.getMetadata().getName());
+ return patchFlinkDeployment(context,
currentBlueGreenDeploymentType);
+ }
+
+ if (specDiff == BlueGreenDiffType.RESUME && currentFlinkDeployment
!= null) {
+ setLastReconciledSpec(context);
+ LOG.info(
+ "In-place resume for '{}'",
currentFlinkDeployment.getMetadata().getName());
+ return patchFlinkDeployment(context,
currentBlueGreenDeploymentType);
+ }
+
+ // Check if child is currently suspended - if so, just patch specs
without restart
Review Comment:
Is there a benefit of patching the spec if the deployment is suspended? A
RESUME command can/will override these changes anyway, am I correct?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]