Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Poor error output when unable to validate Helm chart using cpa verify #118

Open
davidnmbond opened this issue Oct 11, 2024 · 1 comment
Open

Comments

@davidnmbond
Copy link

davidnmbond commented Oct 11, 2024

The Helm chart is valid, and works fine with.

helm install --generate-name --dry-run --debug .

However, cpa verify is giving the following error output, which is unhelpful in figuring out where to go next. This is a blocker for us to publish to the Marketplace and risks us losing our partner status:

cpa verify
CPA Version:  1.3.22
By using the Azure Kubernetes CNAB Packaging Application, you agree to the License contained in the application. You can view the License at ~/LICENSE.
We collect telemetry data, if you would like to opt out of data collection please use the --telemetryOptOut flag.
Correlation Id: cb10c8e7-c344-4403-adb7-058339350909
Manifest file validated, 0 total failure(s)

Manifest verification successful.
Helm chart validated, 1 total failure(s)

  magicsuite-agent-cnabbundle:Invalid type. Expected: [array,null], given: object
2024/10/11 14:18:48
Correlation Id: cb10c8e7-c344-4403-adb7-058339350909, CPABuild: 1.3.22
2024/10/11 14:18:48 magicsuite-agent-cnabbundle:Invalid type. Expected: [array,null], given: object
2024/10/11 14:18:48
For more info refer to the documentation here: https://aka.ms/K8sOfferHelmChart
Marketplace package validated, 0 total failures(s)

2024/10/11 14:18:53 Verification of the helm chart and ARM templates failed.
@davidnmbond
Copy link
Author

For anyone suffering the same issue, this turned out to be a problem in a deployments.yaml file, where environment variables had been incorrectly specified as:

        env:
            Agents__0__ApiUrl: "{{ .Values.apiUrl }}"

...instead of...

        env:
            - name: Agents__0__ApiUrl
              value: "{{ .Values.apiUrl }}"

The issue remains however - the tool should perform better input validation and provide clearer indication of the file (and preferably section) that is causing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant