tweise commented on code in PR #489:
URL:
https://github.com/apache/flink-kubernetes-operator/pull/489#discussion_r1053332127
##########
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/reconciler/deployment/AbstractFlinkResourceReconciler.java:
##########
@@ -116,9 +119,23 @@ public final void reconcile(CR cr, Context<?> ctx) throws
Exception {
if (reconciliationStatus.isBeforeFirstDeployment()) {
LOG.info("Deploying for the first time");
+ if (spec.getJob() != null) {
+ var initialUpgradeMode = UpgradeMode.STATELESS;
+ var initialSp = spec.getJob().getInitialSavepointPath();
+
+ if (initialSp != null) {
+ status.getJobStatus()
+ .getSavepointInfo()
+ .setLastSavepoint(
+ Savepoint.of(initialSp,
SavepointTriggerType.UNKNOWN));
+ initialUpgradeMode = UpgradeMode.SAVEPOINT;
+ }
+
+ spec.getJob().setUpgradeMode(initialUpgradeMode);
Review Comment:
@gyula-fora this wasn't resolved. I would expect the "reconciled" (and
stable) spec to match the spec that was supplied. AFAIK, comparing desired spec
with reconciled/stable spec is currently the only way to determine if all
changes have been applied. If the specs don't match, how can that be achieved?
--
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]