Skip to content

Commit

Permalink
update sonar and make resource config customizable (#1283)
Browse files Browse the repository at this point in the history
  • Loading branch information
BraisVQ authored May 10, 2024
1 parent 760db01 commit baa40ba
Show file tree
Hide file tree
Showing 12 changed files with 59 additions and 22 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- Add availability check for DocGen pod ([#1277](https://github.com/opendevstack/ods-core/pull/1277))

### Changed
- Update SonarQube to 9.9.5 and configure resources for Nexus and Sonarqube in ods-configuration ([#1283](https://github.com/opendevstack/ods-core/pull/1283))

## [4.4.0] - 2024-04-22

Expand Down
32 changes: 31 additions & 1 deletion configuration-sample/ods-core.env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,16 @@ NEXUS_AUTH=developer:changeme
# See https://help.sonatype.com/en/sonatype-nexus-repository-system-requirements.html
NEXUS_JVM_PARAMS="-Xms2703m -Xmx2703m -XX:MaxDirectMemorySize=2703m -Djava.util.prefs.userRoot=/nexus-data/javaprefs"

# Nexus memory and CPU resources
NEXUS_CPU_REQUEST=200m
NEXUS_MEMORY_REQUEST=3Gi
NEXUS_CPU_LIMIT=1
NEXUS_MEMORY_LIMIT=5Gi

# Nexus data and backup capacity
NEXUS_DATA_CAPACITY=60Gi
NEXUS_DATA_BACKUP_CAPACITY=10Gi

#############
# SonarQube #
#############
Expand Down Expand Up @@ -125,7 +135,27 @@ SONAR_EDITION=community
# See Dockerhub https://hub.docker.com/_/sonarqube/tags
# Officially supported is:
# - 9.9 (LTS release)
SONAR_VERSION=9.9.4
SONAR_VERSION=9.9.5

# SonarQube memory and CPU resources
SONARQUBE_CPU_REQUEST=200m
SONARQUBE_MEMORY_REQUEST=2Gi
SONARQUBE_CPU_LIMIT=1
SONARQUBE_MEMORY_LIMIT=4Gi

# SonarQube data and backup capacity
SONARQUBE_DATA_CAPACITY=2Gi
SONARQUBE_EXTENSIONS_CAPACITY=1Gi

# SonarQube database memory and CPU resources
SONARQUBE_DB_CPU_REQUEST=100m
SONARQUBE_DB_MEMORY_REQUEST=256Mi
SONARQUBE_DB_CPU_LIMIT=1
SONARQUBE_DB_MEMORY_LIMIT=512Mi

# SonarQube database and backup capacity
SONARQUBE_DB_CAPACITY=2Gi
SONARQUBE_DB_BACKUP_CAPACITY=1Gi

#########
# Jira #
Expand Down
2 changes: 1 addition & 1 deletion nexus/chart/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.0.0
version: 1.1.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
2 changes: 1 addition & 1 deletion nexus/chart/templates/pvc-data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ spec:
- ReadWriteOnce
resources:
requests:
storage: 60Gi
storage: {{ .Values.nexus.pvcDataCapacity }}
storageClassName: {{ .Values.global.storageClassData }}
volumeMode: Filesystem
2 changes: 1 addition & 1 deletion nexus/chart/templates/pvc-db-backup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ spec:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
storage: {{ .Values.nexus.pvcDataBackupCapacity }}
storageClassName: {{ .Values.global.storageClassData }}
volumeMode: Filesystem
10 changes: 6 additions & 4 deletions nexus/chart/values.yaml.template
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ global:
nexusDockerGroup: 'docker-group'
nexusJvmParams: $NEXUS_JVM_PARAMS
nexus:
cpuRequest: 200m
cpuLimit: 1
memRequest: 2Gi
memLimit: 4Gi
cpuRequest: $NEXUS_CPU_REQUEST
cpuLimit: $NEXUS_CPU_LIMIT
memRequest: $NEXUS_MEMORY_REQUEST
memLimit: $NEXUS_MEMORY_LIMIT
pvcDataCapacity: $NEXUS_DATA_CAPACITY
pvcDataBackupCapacity: $NEXUS_DATA_BACKUP_CAPACITY
buildConfig:
cpuRequest: 200m
cpuLimit: 1
Expand Down
4 changes: 2 additions & 2 deletions sonarqube/chart/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.0.0
version: 1.1.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "9.9.4"
appVersion: "9.9.5"
2 changes: 1 addition & 1 deletion sonarqube/chart/templates/pvc-extensions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ spec:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
storage: {{ .Values.sonarqube.pvcExtensionsCapacity }}
storageClassName: {{ .Values.global.storageClassData }}
volumeMode: Filesystem
2 changes: 1 addition & 1 deletion sonarqube/chart/templates/pvc-postgresql-backup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ spec:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
storage: {{ .Values.postgresql.pvcDatabaseBackupCapacity }}
storageClassName: {{ .Values.global.storageClassData }}
volumeMode: Filesystem
2 changes: 1 addition & 1 deletion sonarqube/chart/templates/pvc-postgresql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ spec:
- ReadWriteOnce
resources:
requests:
storage: 2Gi
storage: {{ .Values.postgresql.pvcDatabaseCapacity }}
storageClassName: {{ .Values.global.storageClassData }}
volumeMode: Filesystem
2 changes: 1 addition & 1 deletion sonarqube/chart/templates/pvc-sonar-data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ spec:
- ReadWriteOnce
resources:
requests:
storage: 2Gi
storage: {{ .Values.sonarqube.pvcDataCapacity }}
storageClassName: {{ .Values.global.storageClassData }}
volumeMode: Filesystem
20 changes: 12 additions & 8 deletions sonarqube/chart/values.yaml.template
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,19 @@ global:
sonarDatabaseImage: $SONAR_DATABASE_IMAGE
postgresql:
name: 'sonarqube-postgresql'
cpuRequest: 100m
cpuLimit: 1
memRequest: 256Mi
memLimit: 512Mi
cpuRequest: $SONARQUBE_DB_CPU_REQUEST
cpuLimit: $SONARQUBE_DB_CPU_LIMIT
memRequest: $SONARQUBE_DB_MEMORY_REQUEST
memLimit: $SONARQUBE_DB_MEMORY_LIMIT
pvcDatabaseCapacity: $SONARQUBE_DB_CAPACITY
pvcDatabaseBackupCapacity: $SONARQUBE_DB_BACKUP_CAPACITY
sonarqube:
cpuRequest: 200m
cpuLimit: 1
memRequest: 2Gi
memLimit: 4Gi
cpuRequest: $SONARQUBE_CPU_REQUEST
cpuLimit: $SONARQUBE_CPU_LIMIT
memRequest: $SONARQUBE_MEMORY_REQUEST
memLimit: $SONARQUBE_MEMORY_LIMIT
pvcDataCapacity: $SONARQUBE_DATA_CAPACITY
pvcExtensionsCapacity: $SONARQUBE_EXTENSIONS_CAPACITY
sonarAuthSaml: $SONAR_AUTH_SAML
sonarAuthSamlApplicationId: $SONAR_SAML_APPLICATION_ID
sonarAuthSamlProviderIdB64: $SONAR_SAML_PROVIDER_ID_B64
Expand Down

0 comments on commit baa40ba

Please sign in to comment.