change panic to fatal log

This commit is contained in:
2025-08-10 14:28:32 +03:00
parent 4ede8161f8
commit b6087afc46
10 changed files with 265 additions and 55 deletions

View File

@@ -17,7 +17,7 @@ func InstallChart(chartSpec go_helm_client.ChartSpec) {
logging.Log.Infof("Upgrading %s", chartSpec.ChartName)
}
if _, err := helmClient.InstallOrUpgradeChart(context.Background(), &chartSpec, nil); err != nil {
panic(err)
logging.Log.Fatal(err)
}
}

View File

@@ -2,6 +2,7 @@ package helm_client
import (
"kube-forge/internal/config"
"kube-forge/internal/logging"
"helm.sh/helm/v3/pkg/repo"
)
@@ -16,7 +17,7 @@ func AddHelmRepo(namespace string, repoSettings config.RepoSettings) {
}
if err := helmClient.AddOrUpdateChartRepo(chartRepo); err != nil {
panic(err)
logging.Log.Fatal(err)
}
}