ARTIFACTORY: How to resolve helm upgrade error "Error: This command needs 2 arguments: release name, chart path" while initialising Artifactory?
Symptoms:
While initializing the Artifactory instance using Helm, you may encounter the following error.
Error: "helm upgrade" requires 2 arguments Usage: helm upgrade [RELEASE] [CHART] [flags] helm.go:81: [debug] "helm upgrade" requires 2 arguments
Troubleshooting steps:
This ERROR indicates that the arguments we pass in the `helm upgrade` command is not in appropriate order [or] format.
If the reason for the error is not so clear, you may add the following DEBUG argument to the helm upgrade command being executed, to increase the verbosity.
helm --debug upgrade --install artifactory jfrog/artifactory
In general, such errors would try to highlight the EXTRA SPACES [or] the disordered arguments being passed in the command. So, ensure that there are no extra-spaces and if you are passing any additional arguments such as ConfigMaps, Licenses, it is required to review if the arguments are separated using commas and not whitespaces.
For example:
Passing the attributes like below would return the mentioned error, where there is an extra space between the arguments supplied through --set attribute.
helm --debug upgrade --install artifactory jfrog/artifactory --set
artifactory.configMapName={my-release-bootstrap-config} databaseUpgradeReady=true --namespace artifactory-namespace
Instead, the correct format should be, where the comma separates the ConfigMap and databaseUpgradeReady attribute.
helm --debug upgrade --install artifactory jfrog/artifactory --set
artifactory.configMapName={my-release-bootstrap-config},databaseUpgradeReady=true --namespace artifactory-namespace