SonarQube 10.6 helm chart issue

Hello,

I’m having trouble installing the helm-chart for SonarQube 10.6 (version 10.6.0+3033).

When running the helm template command locally, this is what I get:

Error: YAML parse error on sonarqube/charts/sonarqube/templates/sonarqube-sts.yaml: error converting YAML to JSON: yaml: line 175: mapping values are not allowed in this context

In the template:

# Source: sonarqube/charts/sonarqube/templates/sonarqube-sts.yaml
[...]
        - name: init-fs
          image: sonarqube:10.6.0-enterprise
          imagePullPolicy: Always
          securityContext:
            capabilities:
              add:
              - CHOWN
              drop:
              - ALL
            privileged: false
            runAsGroup: 0
            runAsNonRoot: false
            runAsUser: 0
            seccompProfile:
              type: RuntimeDefaultresources:
            limits:
              cpu: 50m
              memory: 64Mi

The resources section is directly pasted after the securityContext section without an empty line :frowning:

As far as my preliminary analysis goes, maybe this is linked to the line 175 of the templates/_pod.tpl file:

{{- with (default .Values.initContainers.resources .Values.initFs.resources) -}}

To me, the -}} may be replaced by }}.

HTH

1 Like

I ran into the same issue, commenting out podLabels in the values.yaml file let it render.

Hi,

Maybe you didn’t set a block initContainers.resources. On my side if I unset it, I don’t have the issue, but as long as it it set, the issue occurs.

@davi.vidal: Fix typo in the STS template by Mikaciu · Pull Request #507 · SonarSource/helm-chart-sonarqube · GitHub :wink:

1 Like

They appear to have done the same typo in multiple places. pod labels also seem to be missing a - at the closing braces.

1 Like

Where did you see the issue on your side ? Maybe I can add it to the PR :wink:

If I specify a podLabel on the root level of the values file the same thing happens.
I supplied all things needed to reproduce in SUPPORT-47825, and the service desk personnel has confirmed that they can reproduce it.

1 Like

Hey @Mikaciu!

Thank you for your contribution!
We are reviewing it.

Sorry for the disruption this caused.

1 Like

Hello @Mikaciu and @felestedt.

I created a ticket to address the podLabels issue, which is different (although with a similar origin) than the one being reported in this thread.

With that in mind, @Mikaciu, could you share a minimal snippet that triggers your issue? Could I also ask you to rebase your PR against master so I can run our CI against it?

Looks like this is the minimal values.yaml to break the chart:

persistence:
  enabled: true

initFs:
  enabled: true

initContainers:
  resources:
    limits:
      cpu: 50m
      memory: 64Mi

Can you confirm, @Mikaciu?

Hello @davi.vidal,

On my side I can reproduce with

sonarqube:
  initContainers:
    resources:
      limits:
        cpu: 50m
  persistence:
    enabled: true
  postgresql:
    enabled: false

Hey hello,

PR rebased :wink:

1 Like

Thank you for your contribution, @Mikaciu! :slight_smile:
I just merged your PR.

1 Like

Do you know if a new github release will be triggered for the new version ?

We are using the official helm-chart with as less customizations as possible, including SQ version (we only set the edition).

BR

Hello everyone, SonarQube chart 10.6.1 including the fix is officially released here

The official announcement should follow promptly on the usual communication channels.

Thanks a lot for your patience.

2 Likes

Hello @jeremy.cotineau,

Installed 1 hour ago without any issues, thanks !

2 Likes

I am trying to upgrade the 10.6 but facing this issue.
Error: YAML parse error on is-sonarqube/charts/sonarqube/templates/sonarqube-sts.yaml: error converting YAML to JSON: yaml: line 37: mapping values are not allowed in this context\n\nUse --debug flag to render out invalid YAML"

script returned exit code 20

Hi @Nagoor_Basha_Shaik.

Could you provide the values.yaml that you are using?

Hello @Nagoor_Basha_Shaik Do you mean 10.6.0 or 10.6.1 ?

The 10.6.0 is the faulty one and the fix has been provided on the newest patch release.

Hi Jeremy Cotlineau,

Is 10.6.1 already released or planning to upcoming release.