diff --git a/src/helmTool.ts b/src/helmTool.ts index dd62ff65..74695dd8 100644 --- a/src/helmTool.ts +++ b/src/helmTool.ts @@ -188,15 +188,17 @@ export class HelmTool { // or update the helm charts if they already exist async syncDbCharts(repo: HelmRepository) { // Get the index.yaml file + logger.info({ action: 'syncing helm charts for', repo }) + logger.info({ action: 'getting repository index.yaml' }) const repoindex = await this.getIndexYaml(repo) - console.log('repoindex', repoindex) + logger.debug({ action: 'repoindex', repoindex }) // From the repoindex make an array of charts const indexcharts = Object.keys(repoindex.entries) - console.log('indexcharts', indexcharts) + logger.debug({ action: 'indexcharts', indexcharts }) // For each chart in the index.yaml for (const chartKey of indexcharts) { const chartVersions = repoindex.entries[chartKey] - console.log('chartVersions', chartVersions) + logger.debug({ action: 'chartVersions', chartVersions }) // Get the chart's helm repository details from the database const dbRepository = await this.store.helmrepository.getByUrl({ url: repo.url, @@ -210,6 +212,7 @@ export class HelmTool { }) if (chartInDb) { // update the helm chart in the database + logger.debug({ action: 'updating helm chart', chartInDb }) await this.store.helmchart.update({ id: chartInDb.id, data: { @@ -229,6 +232,7 @@ export class HelmTool { }) } else { // add the helm chart to the database + logger.debug({ action: 'adding helm chart', chart }) await this.store.helmchart.create({ data: { active: true, @@ -296,6 +300,7 @@ export class HelmTool { async updateDbHelmCharts() { // Get list of helm repositories from the database const dbRepos = await this.store.helmrepository.list() + logger.debug({ action: 'dbRepos', dbRepos }) // Run syncDbHelmChart for each repository for (const repo of dbRepos) { await this.syncDbCharts(repo)