klustair / klustair-helm

Helm chart do deploy klustair with anchore
Apache License 2.0
7 stars 4 forks source link

repoCredentials should not be set by default if not using private repo #7

Closed hugodopradofernandes closed 3 years ago

hugodopradofernandes commented 3 years ago

repoCredentials should not be set by default if not using private repo, otherwise it fails:

INFO: Load Pod an Container informations
klustair-runnerjob
INFO: Load trivy Vulnerabilities
klustair-runnerjob
Traceback (most recent call last):
klustair-runnerjob
File "./runner.py", line 841, in
klustair-runnerjob
run()
klustair-runnerjob
File "./runner.py", line 783, in run
klustair-runnerjob
[imageTrivyVulnList, imageTrivyVulnSummary] = getImageTrivyVulnerabilities(uniqueImagesList, repoCredentials)
klustair-runnerjob
File "./runner.py", line 285, in getImageTrivyVulnerabilities
klustair-runnerjob
addCredentials(image['fulltag'], repoCredentials)
klustair-runnerjob
File "./runner.py", line 221, in addCredentials
klustair-runnerjob
for credential, credentialData in repoCredentials.items():
klustair-runnerjob
AttributeError: 'str' object has no attribute 'items'

Issue solved by deleting the repoCredentials line from secret. I'm not using private repo right now. repoCredentials must only have values if explicitly specified with helm --set command

mms-gianni commented 3 years ago

This commit should have fixed it: https://github.com/klustair/klustair-helm/commit/5e57911d6c68d73c3c8c424bcc668d818a5193c6