How to use sonarqube with an ingress

typically for an ingress in front of sonar deployed with a cloud , would I terminate the https certificate in the cloud ingress ?
and in the sonar configuration , would i use url = localhost or the domain name with http , and in the sonar configuration do not mention https.

Hi @anthonylondon :wave:

are you using our official helm chart? If yes this should already give you a hint as we ship a nginx-ingress by default that should be used to handle TLS.
As for the configuration question, i assume that you are talking about the scanner and the answer to this is very much dependend on your infrastructure. the sonar host that you configure needs to be reachable from the point where the scan is executed. this can be a http/https connection to a ip address or a http/https connection to a FQDN. I would of cause recommend to configure TLS.

hope that helps

Thanks for your reply, unfortunately I need to use a GKE internal native ingress - internal company VPC , and then not using the sonar nginx ingress that is is confusing me,
how to disable the sonar nginx ingress
would i terminate the https in the gke ingress, and use localhost instead of the domain url in the sonar configuration.

If you want to disable the nginx ingress in our helm chart you can set nginx.enabled=false and continue to configure your ingress in the ingress section:

ingress:
  enabled: false
  # 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: ImplementationSpecific
  annotations: {}
  # kubernetes.io/ingress.class: nginx
  # kubernetes.io/tls-acme: "true"
  # This property allows for reports up to a certain size to be uploaded to SonarQube
  # nginx.ingress.kubernetes.io/proxy-body-size: "8m"

  # 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: nginx

# 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

localhost is most certainly wrong here. can you clarify where you want to set “the sonar configuration”? This can mean setting the base url in sonarqube or setting the sonar host in the scanner properties. maybe this picture from our documentation can already help you