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


##########
spark-operator/src/main/java/org/apache/spark/k8s/operator/decorators/DriverResourceDecorator.java:
##########
@@ -73,6 +73,10 @@ public <T extends HasMetadata> T decorate(T resource) {
           new ObjectMetaBuilder(resource.getMetadata())
               .addToOwnerReferences(buildOwnerReferenceTo(driverPod))
               .addToLabels(driverPod.getMetadata().getLabels())
+              // Re-apply the resource's own labels last so a label set 
explicitly on
+              // the resource (e.g. a per-service label) wins over the 
driver-pod label
+              // of the same key, rather than being overwritten by it.
+              .addToLabels(resource.getMetadata().getLabels())

Review Comment:
   @ssirowa14,   I'd re-apply the 6 labels @dongjoon-hyun listed plus anything 
prefixed `spark.operator/`, since that namespace is owned by the operator.
    I'd leave `spark-` out though. It isn't a reserved namespace. Adding it 
widens the reserved set and risks the same issue.



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