Any time the helm client that is used by the helm plugin is unable to retrieve the helm chart from the repository the same error message that does not explain the cause of the error is displayed in the Deploy GUI in the Deploy Preview stage:

Error while evaluating rule [helm.K8SRelease.deploy]: Error while executing script [helm/planning/plan_install.py]: Exception: Failed to execute the Helm command in <script> at line number 23

The Deploy deployit.log file also does not give clarification:

2024-06-24 11:48:58.010 [qtp274547248-101] {username=[XLDUSER]} INFO c.xebialabs.overthere.ssh.SshProcess - Command [/opt/oracle/helm/helm_3/linux-amd64/helm --kubeconfig /opt/oracle/xldeploy/temp/ot-20240624T114856785/otpylib_plugin.tmp/k8s_config_file-8811a50e048d27229a5aea43dad1f6c0 --username [REPOUSER] --password [REPOPASSWORD] template [CHART_NAME] --namespace [NAMESPACE]l --version 0.0.70 --repo https://[NEXUS_URL]/[PROJECT]-helm-charts/
.
.
.
-set ******** --set ******** --set ******** --set ******** -f /opt/oracle/xldeploy/temp/ot-20240624T114856785/otpylib_plugin.tmp/values.yaml] on ssh:[USERNAME]@[DOMAIN]:[PORT] returned exit code 1

We ran the (simplified) helm template command manually to see that more information than "exit code 1" or "Failed to execute the Helm command in <script> at line number 23" is obtained. The following command:

helm --username [REPOUSER] --password [REPOPASSWORD] template [CHART_NAME] --version 0.0.70 --repo https://[NEXUS_URL]/[PROJECT]-helm-charts

Gives the following meaningful error when the chart is not available:

Error: chart "[CHART_NAME]" version "0.0.70" not found in https://[NEXUS_URL]/[PROJECT]-helm-charts repository

With an invalid REPOUSER/REPOPASSWORD the manual command also gives useful information:

Error: looks like "https://[NEXUS_URL]/[PROJECT]-helm-charts" is not a valid chart repository or cannot be reached: failed to fetch https://[NEXUS_URL]/[PROJECT]-helm-charts/index.yaml : 401 Unauthorized

We would like the Deploy GUI and the deployit.log logfile to display similar clarifying error messages.

Comments

  • Could you please tell us the version of the plugin you are currently using?

  • This improvement was implemented for a xld-helm-plugin 23.3.3.