Parse error when trying to install kubernetes agent on cluster

I am trying to migrate to the gitlab agent for kubernetes and am at the stage of installing the agent to my cluster. However when I try and run the helm commant it returns:
Error: parse error at (gitlab-agent/templates/observability-secret.yaml:1): unclosed action
I have tried doing this with an empty config.yaml as well as an adjusted version of this demo config, but both return the same error. Its hard to see what Im missing as I have followed the instructions, and the agent is showing when I register it, its just running the command I copied directly fails.

Any help would be appreciated

:wave: I’m following up on this note in case others encounter a similar problem and find this information helpful:

When GitLab Support has received reports of this error in the past, upgrading the version of Helm in use resolved the problem.

The Add troubleshooting info on parse error when installing GitLab agent MR is designed to update the Troubleshooting the GitLab agent for Kubernetes docs to include more information about this. The Document minimum required Helm version issue has a bit more information as well.