Skip to content
Snippets Groups Projects
Commit cc85ce43 authored by Lukasz Lopatowski's avatar Lukasz Lopatowski
Browse files

NMAAS-1028: Minor update

parent d7471000
No related branches found
No related tags found
No related merge requests found
......@@ -26,7 +26,7 @@ public class HelmChartUpdateListener {
@Loggable(LogLevel.INFO)
public ApplicationEvent trigger(ApplicationListUpdatedEvent event) {
// add Helm repository from KubernetesTemplate (it will be overwritten if already exists)
if (Arrays.asList(ADDED, UPDATED).contains(event.getAction())) {
if (Arrays.asList(ADDED, UPDATED).contains(event.getAction()) && event.getDeploymentSpec() != null) {
String repoName = event.getDeploymentSpec().getKubernetesTemplate().getHelmChartRepository().getName();
String repoUrl = event.getDeploymentSpec().getKubernetesTemplate().getHelmChartRepository().getUrl();
if (StringUtils.hasText(repoName) && StringUtils.hasText(repoUrl)) {
......
......@@ -26,4 +26,11 @@ public class ApplicationListUpdatedEvent extends ApplicationEvent {
DELETED;
}
@Override
public String toString() {
return "ApplicationListUpdatedEvent{" +
"name=" + name + ", version=" + version + ", action=" + action + ", deploymentSpec=" + ((deploymentSpec != null) ? "provided" : "empty") +
'}';
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment