+ private final String repoUrl;
+
+ private final String username;
+
+ private final String password;
+
+ public HelmClientImpl(@Value("${chartmuseum.baseurl}")String repoUrl,
+ @Value("${chartmuseum.auth.basic.username}")String username,
+ @Value("${chartmuseum.auth.basic.password}")String password) {
+ this.repoUrl = repoUrl;
+ this.username = username;
+ this.password = password;
+ try{
+ repoAdd(repoUrl, username,password);
+ }catch (Exception e){
+ log.warn("Could not add helm repo.");
+ }
+ }
+
+ private void repoAdd(String repoUrl, String username, String password) {
+ ProcessBuilder builder = new ProcessBuilder();
+ builder.inheritIO();
+ builder.command("helm", "repo", "add", "local", repoUrl,
+ "--username", username, "--password", password);
+ runProcess(builder, "repoAdd");
+ }
+