You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by he...@apache.org on 2020/07/08 13:18:27 UTC

[brooklyn-server] 17/20: Should inherit location from parent

This is an automated email from the ASF dual-hosted git repository.

heneveld pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/brooklyn-server.git

commit 24cc6b2f480c532fcb185dcbf9125ec35e248078
Author: Duncan Grant <du...@cloudsoft.io>
AuthorDate: Wed Jul 8 11:42:34 2020 +0100

    Should inherit location from parent
---
 .../java/org/apache/brooklyn/container/entity/helm/HelmEntityImpl.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/locations/container/src/main/java/org/apache/brooklyn/container/entity/helm/HelmEntityImpl.java b/locations/container/src/main/java/org/apache/brooklyn/container/entity/helm/HelmEntityImpl.java
index 6d417e8..70dda0f 100644
--- a/locations/container/src/main/java/org/apache/brooklyn/container/entity/helm/HelmEntityImpl.java
+++ b/locations/container/src/main/java/org/apache/brooklyn/container/entity/helm/HelmEntityImpl.java
@@ -27,6 +27,7 @@ import org.apache.brooklyn.api.sensor.AttributeSensor;
 import org.apache.brooklyn.container.location.kubernetes.KubernetesLocation;
 import org.apache.brooklyn.core.entity.AbstractEntity;
 import org.apache.brooklyn.core.entity.Attributes;
+import org.apache.brooklyn.core.entity.Entities;
 import org.apache.brooklyn.core.mgmt.BrooklynTaskTags;
 import org.apache.brooklyn.core.sensor.Sensors;
 import org.apache.brooklyn.core.sensor.function.FunctionSensor;
@@ -301,7 +302,7 @@ public class HelmEntityImpl extends AbstractEntity implements HelmEntity {
     }
 
     private KubernetesLocation getLocation() {
-        return (KubernetesLocation) getLocations().stream().filter(KubernetesLocation.class::isInstance).findFirst().get();
+        return (KubernetesLocation) Entities.getAllInheritedLocations(this).stream().filter(KubernetesLocation.class::isInstance).findFirst().get();
     }
 
     private Callable<Integer> getKubeReplicasCallable(String deploymentName) {