SonarQube 9.9 LTA Installation on OpenShift cluster - using local helm chart

  • which versions are you using SonarQube: 9.9 LTA
  • how is SonarQube deployed: Want to deploy using Helm on OpenShift cluster
  • what are you trying to achieve: to deploy and successfully access sonarqube using helm chart in my local which is forked from the sonarqube github
  • what have you tried so far to achieve this:
    i forked the helm chart from GitHub - SonarSource/helm-chart-sonarqube to my local and tried to run this command to install the helm chart

➜ sonarqube git:(sonarqube) helm upgrade --install -n sonarqube-inst sonarqube Users/umamahiswarir/Library/CloudStorage/Box-Box/NEWTP/KEYBANK/GITHUB-REPOS/rtr-devops-tools/sonar-10.5-latest/charts/sonarqube -f values.yaml
Release “sonarqube” does not exist. Installing it now.
Error: repo Users not found

then i tried running
helm repo add sonarqube Sonarsource Chart Repository
helm repo update

still the same error

  1. Tried to run below command to install and got the below error
    ➜ charts git:(sonarqube) helm upgrade --install -n sonarqube-inst sonarqube ./sonarqube -f ./sonarqube/values.yaml
    Release “sonarqube” does not exist. Installing it now.
    Error: An error occurred while checking for chart dependencies. You may need to run helm dependency build to fetch missing dependencies: found in Chart.yaml, but missing in charts/ directory: postgresql, ingress-nginx

then tried running helm dependenct build and got this error

➜ charts git:(sonar-instance) helm dependency build ./sonarqube
Error: no repository definition for https://raw.githubusercontent.com/bitnami/charts/pre-2022/bitnami, Welcome - Ingress-Nginx Controller. Please add the missing repos via ‘helm repo add’

Please help me with this on installing sonarqube from the local helm chart

I followed below commands to install it

➜ helm-chart-sonarqube git:(release/10.5) ✗ helm dependency list ./charts/sonarqube NAME VERSION REPOSITORY STATUS postgresql 10.15.0 https://raw.githubusercontent.com/bitnami/charts/pre-2022/bitnami missing ingress-nginx 4.9.1 Welcome - Ingress-Nginx Controller missing

➜ helm-chart-sonarqube git:(release/10.5) ✗ helm upgrade --install -n sonar-new sonarqube-new ./charts/sonarqube -f ./charts/sonarqube/values.yaml Release “sonarqube-new” does not exist. Installing it now. Error: An error occurred while checking for chart dependencies. You may need to run helm dependency build to fetch missing dependencies: found in Chart.yaml, but missing in charts/ directory: postgresql, ingress-nginx

➜ helm-chart-sonarqube git:(release/10.5) ✗ helm dependency build ./charts/sonarqube
Hang tight while we grab the latest from your chart repositories…
…Successfully got an update from the “ingress-nginx” chart repository
…Successfully got an update from the “postgresql” chart repository
Update Complete. ⎈Happy Helming!⎈
Saving 2 charts
Downloading postgresql from repo https://raw.githubusercontent.com/bitnami/charts/pre-2022/bitnami
Downloading ingress-nginx from repo Welcome - Ingress-Nginx Controller
Deleting outdated charts

➜ helm-chart-sonarqube git:(release/10.5) ✗ helm repo ls
NAME URL
ingress-nginx Welcome - Ingress-Nginx Controller
postgresql https://raw.githubusercontent.com/bitnami/charts/pre-2022/bitnami

➜ helm-chart-sonarqube git:(release/10.5) ✗ helm upgrade --install -n sonar-new sonarqube-new ./charts/sonarqube -f ./charts/sonarqube/values.yaml
Release “sonarqube-new” does not exist. Installing it now.
NAME: sonarqube-new
LAST DEPLOYED: Tue Apr 30 14:51:38 2024
NAMESPACE: sonar-new
STATUS: deployed
REVISION: 1
NOTES:

Since am not using nginx or postgresql and i have updated the values.yaml to false for both.
is there any way i can skip the helm dependency build since i dont need it for my deployment?

Hey there.

To quote this StackOverflow post:

helm dependency update command will download all the subchart specified in the dependencies option and download it to the charts/ directory, even you have them disabled in values.yaml. However, only enabled charts will be installed.

So I don’t think there’s any way to skip it.