You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/05/15 03:19:47 UTC
[GitHub] [flink-kubernetes-operator] Aitozi commented on a diff in pull request #215: [FLINK-27163] Add label for the session job to help list the session …
Aitozi commented on code in PR #215:
URL: https://github.com/apache/flink-kubernetes-operator/pull/215#discussion_r873102697
##########
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/reconciler/sessionjob/FlinkSessionJobReconciler.java:
##########
@@ -76,6 +78,24 @@ public void reconcile(FlinkSessionJob flinkSessionJob, Context context) throws E
OperatorUtils.getSecondaryResource(
flinkSessionJob, context, configManager.getOperatorConfiguration());
+ var labels = flinkSessionJob.getMetadata().getLabels();
+ if (labels == null) {
+ labels = new HashMap<>();
+ }
+ if (!flinkSessionJob
+ .getSpec()
+ .getDeploymentName()
+ .equals(labels.get(LABEL_SESSION_CLUSTER))) {
+ labels.put(LABEL_SESSION_CLUSTER, flinkSessionJob.getSpec().getDeploymentName());
+ flinkSessionJob.getMetadata().setLabels(labels);
+ kubernetesClient
Review Comment:
The reconciler do not return `UpdateControl` now, If we want to use the update control for it, we should adjust the interface first to return the update control :/ . We have just decide not to do [this](https://issues.apache.org/jira/browse/FLINK-26915) now. I'm not sure whether we need to break it for this PR.
--
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org