peimanja / artifactory_exporter

JFrog Artifactory Prometheus Exporter written in Go
Apache License 2.0
141 stars 37 forks source link

Error when both ARTI_PASSWORD and ARTI_ACCESS_TOKEN are set #145

Closed joonatan-paypay closed 1 month ago

joonatan-paypay commented 1 month ago

When filing a bug, please include the following headings if possible. Any example text in this template can be deleted.

Overview of the Issue

This is a minor issue, but below error is given when both ARTI_PASSWORD and ARTI_ACCESS_TOKEN are set. The simple fix is to set only one of the variables, although it is unclear would setting both variables affect anything in the exporter. Regardless the error message is very misleading. Should be a simple validation problem.

"Error creating the config." err="ARTI_USERNAME and ARTI_PASSWORD or ARTI_ACCESS_TOKEN environment variable hast to be set"

Reproduction Steps

Steps to reproduce this issue: Install using helm chart, set both ARTI_PASSWORD and ARTI_ACCESS_TOKEN. Pod will not start, and error is given in the pod log.

Operating system and Environment details

MacOS, did a template of the helm chart into yaml and applied with kubectl.

Logs

time=2024-08-07T05:46:18.497Z level=ERROR msg="Error creating the config." err="ARTI_USERNAME and ARTI_PASSWORD or ARTI_ACCESS_TOKEN environment variable hast to be set"