aboutsummaryrefslogtreecommitdiffstats
path: root/participant
diff options
context:
space:
mode:
authorrameshiyer27 <ramesh.murugan.iyer@est.tech>2024-05-08 12:01:59 +0100
committerrameshiyer27 <ramesh.murugan.iyer@est.tech>2024-05-10 12:14:27 +0100
commit53a67c9cb7e1d99446c581872d7a1bd2a790d16f (patch)
treec71d830df1255a67a68031e00757ac149a6254a1 /participant
parent829f456c058aeac23f65293bcadbe6dc1c726fc0 (diff)
Fix chartmuseum sync issue in k8s participant
Issue-ID: POLICY-4968 Change-Id: Ieb4b49b4ca40faf1fb8b948e8326decd9c0ae493 Signed-off-by: zrrmmua <ramesh.murugan.iyer@est.tech>
Diffstat (limited to 'participant')
-rw-r--r--participant/participant-impl/participant-impl-kubernetes/src/main/java/org/onap/policy/clamp/acm/participant/kubernetes/helm/HelmClient.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/participant/participant-impl/participant-impl-kubernetes/src/main/java/org/onap/policy/clamp/acm/participant/kubernetes/helm/HelmClient.java b/participant/participant-impl/participant-impl-kubernetes/src/main/java/org/onap/policy/clamp/acm/participant/kubernetes/helm/HelmClient.java
index 8aca5245f..5b13a44a1 100644
--- a/participant/participant-impl/participant-impl-kubernetes/src/main/java/org/onap/policy/clamp/acm/participant/kubernetes/helm/HelmClient.java
+++ b/participant/participant-impl/participant-impl-kubernetes/src/main/java/org/onap/policy/clamp/acm/participant/kubernetes/helm/HelmClient.java
@@ -1,6 +1,6 @@
/*-
* ========================LICENSE_START=================================
- * Copyright (C) 2021-2023 Nordix Foundation. All rights reserved.
+ * Copyright (C) 2021-2024 Nordix Foundation. All rights reserved.
* ======================================================================
* Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
* ======================================================================
@@ -81,9 +81,10 @@ public class HelmClient {
logger.info("Adding repository to helm client");
executeCommand(prepareRepoAddCommand(repo));
logger.debug("Added repository {} to the helm client", repo.getRepoName());
- return true;
+ return updateHelmRepo();
}
- logger.info("Repository already exists");
+ logger.info("Repository already exists, updating the repo");
+ updateHelmRepo();
return false;
}
@@ -270,7 +271,7 @@ public class HelmClient {
private boolean updateHelmRepo() {
try {
- logger.info("Updating local helm repositories before verifying the chart");
+ logger.info("Updating local helm repositories");
executeCommand(new ProcessBuilder().command(COMMAND_HELM, "repo", "update"));
logger.debug("Helm repositories updated successfully");
} catch (ServiceException e) {