if you are using our official helm chart, you can configure the ingress like this:
---
ingress:
enabled: true
# Used to create an Ingress record.
hosts:
- name: sonarqube.your-org.com
# Different clouds or configurations might need /* as the default path
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)
pathType: Prefix
annotations:
kubernetes.io/ingress.class: "gce"
# 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/
ingressClassName: gce
# Additional labels for Ingress manifest file
# labels:
# traffic-type: external
# traffic-type: internal
tls: []
# Secrets must be manually created in the namespace.
# - secretName: chart-example-tls
# hosts:
# - 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
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 nginx.ingress.kubernetes.io/proxy-body-size.
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.
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: