kubernetes / ingress-nginx

Ingress-NGINX Controller for Kubernetes
https://kubernetes.github.io/ingress-nginx/
Apache License 2.0
17.02k stars 8.15k forks source link

ArgoCD installation results in "Failed to unmarshal "values.yaml": <nil>" #11066

Open avilesj opened 4 months ago

avilesj commented 4 months ago

What happened: Installation through ArgoCD results in Failed to unmarshal "values.yaml": <nil> while using the default values file.

What you expected to happen: Helm chart should be installed through ArgoCD using the default values successfully.

NGINX Ingress controller version (exec into the pod and run nginx-ingress-controller --version.):

Kubernetes version (use kubectl version): (chart version) 4.10.0 v1.28.4 Environment:

How to reproduce this issue:

  1. Install ArgoCD
  2. Configure an Application CRD that installs this helm chart with default values.
  3. Application should display the error "Failed to unmarshal "values.yaml": " and not sync.

Anything else we need to know: This is in my homelab. I use the app of apps pattern to install everything and everything works so far. I am migrating from Traefik to NGINX through this helm chart and found this error with the default values files.

I had seen something like this before with a prometheus helm chart where the values files had some portions that kind of looked like a kubernetes manifest, which made the parser blow up. That one was easier to catch and work out but I am not sure what's going on with this helm chart. (Or me, of course :) )

k8s-ci-robot commented 4 months ago

This issue is currently awaiting triage.

If Ingress contributors determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
longwuyuan commented 4 months ago

/remove-kind bug

Please attempt an install with helm and report status

/triage needs-information

avilesj commented 4 months ago

Direct helm installation works.

longwuyuan commented 4 months ago
github-actions[bot] commented 3 months ago

This is stale, but we won't close it automatically, just bare in mind the maintainers may be busy with other tasks and will reach your issue ASAP. If you have any question or request to prioritize this, please reach #ingress-nginx-dev on Kubernetes Slack.

D1StrX commented 3 months ago

Minio tenant of the Minio Operator is also a perfect example of a Helm values.yaml that Argocd cannot parse. The issue in this one are all the 'exotic' tokens (e.g: `__ and ###) https://github.com/minio/operator/blob/master/helm/tenant/values.yaml

longwuyuan commented 3 months ago

@D1StrX thanks for the update.

With this info, I guess we can be certain that the problem is parsing.

The project maintains the chart for helm usage and no problem is detected on helm usage.

Since the fields containing tokens or extraArgs or raw yaml work with helm and seem to break when ArgoCD parses it, I think its better to approach the ArgoCD developers for comments. I don't think there are resources available on this project to test and debug ArgoCD integration for parsers/parsing values file content.

D1StrX commented 3 months ago

Minio tenant of the Minio Operator is also a perfect example of a Helm values.yaml that Argocd cannot parse. The issue in this one are all the 'exotic' tokens (e.g: `__ and ###) https://github.com/minio/operator/blob/master/helm/tenant/values.yaml

Was able to narrow it down to the KES config part in the Minio tenant values.yaml. So, my suggestion would be; Try stripping down the values.yaml for your nginx Helm deployment and then push it to Git to let ArgoCD apply the changes.

I also tried the apps-of-apps pattern for the Kubernetes-nginx controllers, and I'm not experiencing any issues at all. I'm using the default values.yaml file with basic value changes in the default keys.

D1StrX commented 2 days ago

Funny thing with argo-cd helm chart, this also says Failed to unmarshal when deploying ArgoCD with ArgoCD.

When testing/narrowing down this issue: It's due a line or lines that has a single # .
Not due ## or # @default lines in my tests. I first removed # @default lines and next ##