ssirowa14 commented on code in PR #925:
URL:
https://github.com/apache/spark-kubernetes-operator/pull/925#discussion_r4251679010
##########
spark-operator/src/main/java/org/apache/spark/k8s/operator/decorators/DriverResourceDecorator.java:
##########
@@ -69,13 +95,29 @@ public <T extends HasMetadata> T decorate(T resource) {
}
if (!ownerReferenceExists) {
log.debug("Adding OwnerReference to driver for secondary resource");
- ObjectMeta metaData =
+ Map<String, String> resourceLabels = resource.getMetadata().getLabels();
+ ObjectMetaBuilder builder =
new ObjectMetaBuilder(resource.getMetadata())
- .addToOwnerReferences(buildOwnerReferenceTo(driverPod))
- .addToLabels(driverPod.getMetadata().getLabels())
- .build();
- resource.setMetadata(metaData);
+ .addToOwnerReferences(buildOwnerReferenceTo(driverPod));
+ driverPod.getMetadata().getLabels().forEach((key, value) -> {
Review Comment:
> In that case, it would help to say so in the PR description and the
migration guide.
I will update things in next iteration.
--
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]