SonarQube 9 with Helm chart in K8s

Hello guys, happy new year everyone!

New to Kubernets/helm. We had a deployment of Sonar 8.9 in k8s but because we are upgrading to Developer version and to fix Log4jerk, I am trying to redeploy to version 9.2.

As it was not in use yet, I did not update but removed the old chart and tried configuring the new, with no success. I am facing an Sintax Error with sonarqube-sts.yaml when trying to convert yaml to json.

# helm upgrade --install -f values.yaml -n sonarqube sonarqube ./
Error: UPGRADE FAILED: YAML parse error on sonarqube/templates/sonarqube-sts.yaml: error converting YAML to JSON: yaml: line 76: did not find expected key

Line 76 does not seems wrong

          resources:
{{ toYaml .Values.initContainers.resources | indent 12 }}
          volumeMounts:
            - mountPath: /tmp/certs
              name: sonarqube

I though maybe incompatible versions of helm/kubectl but following the docs it seems to be the right one. Anyone had this error before? Its not a file I have changed in any way.

Helm v3.7.1
Kubectl v1.20.4
external Postgresql db

Thank you all in advance.

Hi @julia.cardoso and welcome to the community :wave:

can you compare your values to the one that are currently on master and see if there is something that might be in the wrong scope?
In general it would help if you could provide a minimal example of your values file that reproduces this error.

1 Like

Hello, thanks for answering! I am seeing if i can get the doc or part of it to share.

I used the original file to make the new one, including all the configuration. It also had errors of yaml to json conversion - all of them in places where {} was used. I have no idea why, seems like the new files from the recent version of the helm files is different than what was used before.

that seems to be more related to helm and not to the chart itself. i guess you are familiar with this but i am writing this for completeness here; {{ }} indicates a functional lookup for the go template language. If helm can not parse this, something in the helm installation is not working correctly.

1 Like

I knew it! looks too much like incompatibility with helm.

Well, I am going to have a talk with who installed the tools and last sonarqube.

Thank you so much!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.