ssirowa14 commented on code in PR #925:
URL: 
https://github.com/apache/spark-kubernetes-operator/pull/925#discussion_r4252506862


##########
spark-operator/src/main/java/org/apache/spark/k8s/operator/decorators/DriverResourceDecorator.java:
##########
@@ -45,10 +51,30 @@
 public class DriverResourceDecorator implements ResourceDecorator {
   private final Pod driverPod;
 
+  /**
+   * Operator- and Spark-managed identity labels whose driver-pod value must 
always propagate to
+   * secondary resources unchanged. A resource's own label of the same key 
must never override them.
+   * Any label key under the {@value #MANAGED_LABEL_PREFIX} prefix is 
protected the same way.
+   */
+  private static final Set<String> MANAGED_LABEL_KEYS =
+      Set.of(
+          LABEL_SPARK_ROLE_NAME,
+          LABEL_SPARK_VERSION_NAME,
+          LABEL_SPARK_APP_SELECTOR,
+          LABEL_SPARK_APP_NAME);
+
+  /** Any label key starting with this prefix is treated as operator-managed 
and protected. */
+  private static final String MANAGED_LABEL_PREFIX = "spark.operator/";

Review Comment:
   I've done the refactoring in latest commit.



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to