hi, I am deploying sonar on GKE - I installed sonar using a helm chart ,using the GKE native ingress, so I disabled the sonarqube ingress ,
but get no traffic into the sonarqube pod - I have a http timeout , and no logs to see.
i can’t see how to turn on debug level on sonar
I wonder what I need to do to get the GKE native ingress working with sonarqube?
Hi @anthonylondon ,
if you are using our official helm chart, you can configure the ingress like this:
# Used to create an Ingress record.
- name: sonarqube.your-org.com
# Different clouds or configurations might need /* as the default path
# For additional control over serviceName and servicePort
# serviceName: someService
# servicePort: somePort
# the pathType can be one of the following values: Exact|Prefix|ImplementationSpecific(default)
# kubernetes.io/tls-acme: "true"
# Set ingressClassName if kubernetes version is >= 1.18
# Reference: https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/
# Additional labels for Ingress manifest file
# traffic-type: external
# traffic-type: internal
# Secrets must be manually created in the namespace.
# - secretName: chart-example-tls
# - chart-example.local
or if you don’t want the ingress to be deployed via our helm chart, you can create on based on the rendered template on your own
ingressClassName: gce <--- if kubernetes version is >= 1.18
- host: sonarqube.your-org.com
that all said i would really recommand using the nginx-ingress class as depending on the scanner size you will need to increase the body size of the ingress and as far as i know this is currently not possible with gce ingress. with nginx-ingress you can define the body size using the annotation
hope that helps
May I ask
for us port 8080 is better than 9000
i tried using the helm parameter -service.internalPort to replace 9000 with 8080
but the port-forward still uses 9000 , the helm chart does not seem to pick up 8080 for the internal port?
internal port is the port where sonarqube is exposed from the container. if you want to change the port where sonarqube is exposed to the service you need to change the external port.
our helm chart picks up this change so this will change the ingress, but if you deployed the ingress manually, you will need to change the backends service port as well.
Hi, thanks for your reply
i changed to
but from the pod logs i can still see it starting http on 9000
some blogs mention : #sonar.web.port=9000 , but i tried to add it in the manifest with no success
some blogs mention this issue, i have tried your LTE version and the latest 2.0.0 helm chart - all the same , they all start on 9000 not 8080
I think there is a little misunderstanding here.
The application can start on the port that is defined on
sonar.web.port (if using properties) or
SONAR_WEB_PORT (if using env vars) and defaults to 9000. This is translated to the
service.internalPort of the helm chart. The
service.externalPort still exposes this service on port 9000 if not modified.
So if you want to change the internal port AND the external port for whatever reason you need to set the following values in the helm chart:
- name: SONAR_WEB_PORT
it finally worked,
I had to add:
SONAR_WEB_PORT to get port 8080 for the pod exposed
in my argoCD
repoURL: ‘Sonarsource Chart Repository’
- name: SONAR_WEB_PORT
- name: ‘ingress.hosts.name’
- name: service.internalPort
- name: service.externalPort
- name: ingress.enabled
- name: service.type
my health check failed due to port 9000 even though i am using 8080 for LTS 1.x helm chart
so using 2.x version
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.