Skip to content

Commit

Permalink
Use port's name (#128)
Browse files Browse the repository at this point in the history
  • Loading branch information
gbonnefille authored Dec 13, 2021
1 parent 9b49f0a commit 258c2f9
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 11 deletions.
3 changes: 3 additions & 0 deletions charts/sonarqube-dce/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# SonarQube Chart Changelog
All changes to this chart will be documented in this file.

## [0.2.2]
* replaced hardcoded port's values

## [0.2.1]
* updated SonarQube to 9.2.1

Expand Down
4 changes: 2 additions & 2 deletions charts/sonarqube-dce/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
name: sonarqube-dce
description: SonarQube offers Code Quality and Code Security analysis for up to 27 languages. Find Bugs, Vulnerabilities, Security Hotspots and Code Smells throughout your workflow.
version: 0.2.1
version: 0.2.2
appVersion: 9.2.1
keywords:
- coverage
Expand All @@ -22,7 +22,7 @@ annotations:
url: https://community.sonarsource.com/
artifacthub.io/changes: |
- kind: changed
description: "updated SonarQube to 9.2.1"
description: "replaced hardcoded port's values"
artifacthub.io/containsSecurityUpdates: "false"
artifacthub.io/images: |
- name: sonarqube-app
Expand Down
6 changes: 3 additions & 3 deletions charts/sonarqube-dce/templates/sonarqube-application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ spec:
httpGet:
scheme: HTTP
path: {{ .Values.ApplicationNodes.livenessProbe.sonarWebContext }}api/system/liveness
port: 9000
port: http
httpHeaders:
- name: X-Sonar-Passcode
value: {{ .Values.monitoringPasscode }}
Expand All @@ -242,7 +242,7 @@ spec:
# A Sonarqube container is considered ready if the status is UP, DB_MIGRATION_NEEDED or DB_MIGRATION_RUNNING
# status about migration are added to prevent the node to be kill while sonarqube is upgrading the database.
host="$(hostname -i || echo '127.0.0.1')"
if wget -qO- http://${host}:9000{{ .Values.ApplicationNodes.readinessProbe.sonarWebContext }}api/system/status | grep -q -e '"status":"UP"' -e '"status":"DB_MIGRATION_NEEDED"' -e '"status":"DB_MIGRATION_RUNNING"'; then
if wget -qO- http://${host}:{{ .Values.service.internalPort }}{{ .Values.ApplicationNodes.readinessProbe.sonarWebContext }}api/system/status | grep -q -e '"status":"UP"' -e '"status":"DB_MIGRATION_NEEDED"' -e '"status":"DB_MIGRATION_RUNNING"'; then
exit 0
fi
exit 1
Expand All @@ -253,7 +253,7 @@ spec:
httpGet:
scheme: HTTP
path: {{ .Values.ApplicationNodes.startupProbe.sonarWebContext }}api/system/status
port: 9000
port: http
initialDelaySeconds: {{ .Values.ApplicationNodes.startupProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.ApplicationNodes.startupProbe.periodSeconds }}
failureThreshold: {{ .Values.ApplicationNodes.startupProbe.failureThreshold }}
Expand Down
3 changes: 3 additions & 0 deletions charts/sonarqube/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# SonarQube Chart Changelog
All changes to this chart will be documented in this file.

## [1.2.2]
* fix hardcoded reference to port 9000

## [1.2.1]
* updated SonarQube to 9.2.1

Expand Down
4 changes: 2 additions & 2 deletions charts/sonarqube/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
name: sonarqube
description: SonarQube offers Code Quality and Code Security analysis for up to 27 languages. Find Bugs, Vulnerabilities, Security Hotspots and Code Smells throughout your workflow.
version: 1.2.1
version: 1.2.2
appVersion: 9.2.1
keywords:
- coverage
Expand All @@ -22,7 +22,7 @@ annotations:
url: https://community.sonarsource.com/
artifacthub.io/changes: |
- kind: changed
description: "updated SonarQube to 9.2.1"
description: "replaced hardcoded port's value"
artifacthub.io/containsSecurityUpdates: "false"
artifacthub.io/images: |
- name: sonarqube
Expand Down
2 changes: 1 addition & 1 deletion charts/sonarqube/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ spec:
httpGet:
scheme: HTTP
path: {{ .Values.livenessProbe.sonarWebContext }}api/system/liveness
port: 9000
port: http
httpHeaders:
- name: X-Sonar-Passcode
value: {{ .Values.monitoringPasscode }}
Expand Down
6 changes: 3 additions & 3 deletions charts/sonarqube/templates/sonarqube-sts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ spec:
httpGet:
scheme: HTTP
path: {{ .Values.livenessProbe.sonarWebContext }}api/system/liveness
port: 9000
port: http
httpHeaders:
- name: X-Sonar-Passcode
value: {{ .Values.monitoringPasscode }}
Expand All @@ -322,7 +322,7 @@ spec:
# A Sonarqube container is considered ready if the status is UP, DB_MIGRATION_NEEDED or DB_MIGRATION_RUNNING
# status about migration are added to prevent the node to be kill while sonarqube is upgrading the database.
host="$(hostname -i || echo '127.0.0.1')"
if wget -qO- http://${host}:9000{{ .Values.readinessProbe.sonarWebContext }}api/system/status | grep -q -e '"status":"UP"' -e '"status":"DB_MIGRATION_NEEDED"' -e '"status":"DB_MIGRATION_RUNNING"'; then
if wget -qO- http://${host}:{{ .Values.service.internalPort }}{{ .Values.readinessProbe.sonarWebContext }}api/system/status | grep -q -e '"status":"UP"' -e '"status":"DB_MIGRATION_NEEDED"' -e '"status":"DB_MIGRATION_RUNNING"'; then
exit 0
fi
exit 1
Expand All @@ -333,7 +333,7 @@ spec:
httpGet:
scheme: HTTP
path: {{ .Values.readinessProbe.sonarWebContext }}api/system/status
port: 9000
port: http
initialDelaySeconds: {{ .Values.startupProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.startupProbe.periodSeconds }}
failureThreshold: {{ .Values.startupProbe.failureThreshold }}
Expand Down

0 comments on commit 258c2f9

Please sign in to comment.