add .helm dir

Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/d091f82a
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/d091f82a
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/d091f82a

Branch: refs/heads/master
Commit: d091f82a988fc6bad42bc8937a1e3a632aa7b4ae
Parents: d1b4941
Author: andreaturli <andrea.tu...@gmail.com>
Authored: Wed Apr 11 15:02:56 2018 +0200
Committer: andreaturli <andrea.tu...@gmail.com>
Committed: Wed Apr 11 15:02:56 2018 +0200

----------------------------------------------------------------------
 .../container/location/kubernetes/KubernetesLocation.java   | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/d091f82a/locations/container/src/main/java/org/apache/brooklyn/container/location/kubernetes/KubernetesLocation.java
----------------------------------------------------------------------
diff --git 
a/locations/container/src/main/java/org/apache/brooklyn/container/location/kubernetes/KubernetesLocation.java
 
b/locations/container/src/main/java/org/apache/brooklyn/container/location/kubernetes/KubernetesLocation.java
index 3a10449..5450a1b 100644
--- 
a/locations/container/src/main/java/org/apache/brooklyn/container/location/kubernetes/KubernetesLocation.java
+++ 
b/locations/container/src/main/java/org/apache/brooklyn/container/location/kubernetes/KubernetesLocation.java
@@ -133,6 +133,8 @@ import java.io.InputStream;
 import java.net.InetAddress;
 import java.net.URI;
 import java.nio.charset.Charset;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.List;
@@ -550,6 +552,13 @@ public class KubernetesLocation extends AbstractLocation 
implements MachineProvi
         if (!isTillerInstalled("kube-system", podLabels)) {
             installTillerPodAndService("kube-system", "tiller-deploy", 
podLabels);
         }
+        // Create ${HOME}/.helm/{cache/archive,repository/cache}
+        try {
+            
Files.createDirectories(Paths.get(System.getProperty("user.home"),".helm", 
"cache", "archive"));
+            
Files.createDirectories(Paths.get(System.getProperty("user.home"),".helm", 
"repository", "cache"));
+        } catch (IOException e) {
+            throw Throwables.propagate(e);
+        }
         tiller = Suppliers.memoize(new 
TillerSupplier((DefaultKubernetesClient) client)).get();
         String chartName = entity.config().get(KubernetesHelmChart.CHART_NAME);
         String chartVersion = 
entity.config().get(KubernetesHelmChart.CHART_VERSION);

Reply via email to