Skip to content

Commit

Permalink
Update java/operator/org.eclipse.theia.cloud.operator/src/main/java/o…
Browse files Browse the repository at this point in the history
…rg/eclipse/theia/cloud/operator/util/K8sUtil.java

Co-authored-by: Lucas Koehler <[email protected]>
  • Loading branch information
jfaltermeier and lucas-koehler authored Nov 28, 2024
1 parent a18697d commit 29e99ee
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,7 @@ private static <T extends HasMetadata, U, V extends Resource<T>> Optional<T> loa
newItem.getMetadata().getLabels().putAll(labelsToAdd);

// If the resource is a Deployment, also apply labels to the pod template metadata
if (newItem instanceof Deployment) {
Deployment deployment = (Deployment) newItem;
if (newItem instanceof Deployment deployment) {
if (deployment.getSpec().getTemplate().getMetadata().getLabels() == null) {
deployment.getSpec().getTemplate().getMetadata().setLabels(new HashMap<>());
}
Expand Down

0 comments on commit 29e99ee

Please sign in to comment.