Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the possibility of to save the data with hostpath. #605

Open
wants to merge 38 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
3d83c1a
Add the possibility of to save the data with hostpath.
Dec 11, 2024
5cdaab8
Add changelog and version.
Dec 11, 2024
2e5c86d
Typo
Dec 12, 2024
78d5d05
Merge branch 'SonarSource:master' into master
jbazp Dec 17, 2024
49f7976
Merge branch 'SonarSource:master' into master
jbazp Dec 27, 2024
7d325e4
Added test.
Dec 27, 2024
b8563b3
Added hostPath storage for sonarqube-dce.
Dec 27, 2024
c32833c
Changed version
Dec 27, 2024
77888b8
Updated version
Dec 27, 2024
8713d75
Merge branch 'SonarSource:master' into master
jbazp Jan 8, 2025
427da6d
Updated version
Jan 9, 2025
4f7105f
Add the possibility of to save the data with hostpath.
Dec 11, 2024
8e5a6e4
Add changelog and version.
Dec 11, 2024
5015154
Typo
Dec 12, 2024
888cf8f
Added test.
Dec 27, 2024
01b5682
Added hostPath storage for sonarqube-dce.
Dec 27, 2024
8d6c340
Changed version
Dec 27, 2024
4d94c1b
Rebase
Dec 27, 2024
3e76da2
Updated version
Jan 9, 2025
d17c7e6
Merge remote-tracking branch 'origin/master'
Jan 9, 2025
83914ac
Add the possibility of to save the data with hostpath.
Dec 11, 2024
467a4a2
Add changelog and version.
Dec 11, 2024
28d5399
Typo
Dec 12, 2024
d92de08
Added test.
Dec 27, 2024
291dcd5
Added hostPath storage for sonarqube-dce.
Dec 27, 2024
4bf5672
Changed version
Dec 27, 2024
bed28b7
Rebase
Dec 27, 2024
91103ef
Updated version
Jan 9, 2025
4724a88
Add changelog and version.
Dec 11, 2024
9764f6e
Added hostPath storage for sonarqube-dce.
Dec 27, 2024
ccc0436
Changed version
Dec 27, 2024
6a8d530
Rebasing
Dec 27, 2024
4d55da2
Rebasing
Jan 9, 2025
484fe01
Merge remote-tracking branch 'origin/master'
Jan 13, 2025
01a455a
Merge branch 'SonarSource:master' into master
jbazp Jan 21, 2025
a8af0c7
Merge branch 'SonarSource:master' into master
jbazp Jan 22, 2025
68d572b
Merge branch 'SonarSource:master' into master
jbazp Jan 23, 2025
d4c8825
Merge branch 'SonarSource:master' into master
jbazp Feb 2, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions charts/sonarqube-dce/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ All changes to this chart will be documented in this file.
* Support Kubernetes v1.32
* Remove the default passcode provided with `monitoringPasscode`
* Support Openshift v4.17
* Add the possibility of to save the data with hostpath.

## [10.8.1]
* Update Chart's version to 10.8.1
Expand Down
5 changes: 4 additions & 1 deletion charts/sonarqube-dce/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ The following table lists the configurable parameters of the SonarQube chart and
### Generic Configuration

| Parameter | Description | Default |
| ------------------------ | --------------------------------------------------------------------------------------------------------------------- | ------- |
| ------------------------ |-----------------------------------------------------------------------------------------------------------------------| ------- |
| `affinity` | Node / Pod affinities | `{}` |
| `tolerations` | List of node taints to tolerate | `[]` |
| `priorityClassName` | Schedule pods on priority (e.g. `high-priority`) | `None` |
Expand All @@ -453,6 +453,9 @@ The following table lists the configurable parameters of the SonarQube chart and
| `noProxy` | No proxy for downloading JMX agent and install plugins, will superseed initContainer specific no proxy variables | `` |
| `nodeEncryption.enabled` | Secure the communication between Application and Search nodes using TLS | `false` |
| `ingress-nginx.enabled` | Install Nginx Ingress Helm | `false` |
| `hostPath.enabled` | Flag for enabling storage with `hostPath` | `false` |
| `hostPath.path` | Path where the data will be stored with `hostPath` | `""` |
| `hostPath.type` | `hostPath` volume types | `""` |

### NetworkPolicies

Expand Down
6 changes: 6 additions & 0 deletions charts/sonarqube-dce/templates/sonarqube-application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,13 @@ spec:
secretName: {{ .Values.searchNodes.searchAuthentication.keyStoreSecret }}
{{- end }}
- name: sonarqube
{{- if .Values.hostPath.enabled }}
hostPath:
path: {{ .Values.hostPath.path }}
type: {{ .Values.hostPath.type }}
{{- else }}
emptyDir: {{- toYaml .Values.emptyDir | nindent 10 }}
{{- end }}
- name : tmp-dir
emptyDir: {{- toYaml .Values.emptyDir | nindent 10 }}
{{- if or .Values.ApplicationNodes.sonarProperties .Values.ApplicationNodes.sonarSecretProperties .Values.sonarSecretKey }}
Expand Down
8 changes: 8 additions & 0 deletions charts/sonarqube-dce/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -866,3 +866,11 @@ extraConfig:

# (DEPRECATED) This value is not used in the templates.
terminationGracePeriodSeconds: 60

# In case you want to specify hostPath for to storage into the host.
hostPath:
enabled: false
# Path where the data will be stored.
#path: /data/sonarqube/
#Type of volume. Must be one of: DirectoryOrCreate, Directory, FileOrCreate, File, Socket, CharDevice, BlockDevice.
#type: DirectoryOrCreate
1 change: 1 addition & 0 deletions charts/sonarqube/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ All changes to this chart will be documented in this file.
* Remove the default passcode provided with `monitoringPasscode`
* Support Openshift v4.17
* Improves editions and versions setting for sonarqube chart
* Add the possibility of to save the data with hostpath.

## [10.8.1]
* Update Chart's version to 10.8.1
Expand Down
29 changes: 16 additions & 13 deletions charts/sonarqube/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -482,19 +482,22 @@ The following table lists the configurable parameters of the SonarQube chart and

### Persistence

| Parameter | Description | Default |
| --------------------------- | ------------------------------------------------- | --------------- |
| `persistence.enabled` | Flag for enabling persistent storage | `false` |
| `persistence.annotations` | Kubernetes pvc annotations | `{}` |
| `persistence.existingClaim` | Do not create a new PVC but use this one | `None` |
| `persistence.storageClass` | Storage class to be used | `""` |
| `persistence.accessMode` | Volumes access mode to be set | `ReadWriteOnce` |
| `persistence.size` | Size of the volume | `5Gi` |
| `persistence.volumes` | (DEPRECATED) Please use extraVolumes instead | `[]` |
| `persistence.mounts` | (DEPRECATED) Please use extraVolumeMounts instead | `[]` |
| `persistence.uid` | UID used for init-fs container | `1000` |
| `persistence.guid` | GUID used for init-fs container | `0` |
| `emptyDir` | Configuration of resources for `emptyDir` | `{}` |
| Parameter | Description | Default |
|-----------------------------|-----------------------------------------------------|-----------------|
| `persistence.enabled` | Flag for enabling persistent storage | `false` |
| `persistence.annotations` | Kubernetes pvc annotations | `{}` |
| `persistence.existingClaim` | Do not create a new PVC but use this one | `None` |
| `persistence.storageClass` | Storage class to be used | `""` |
| `persistence.accessMode` | Volumes access mode to be set | `ReadWriteOnce` |
| `persistence.size` | Size of the volume | `5Gi` |
| `persistence.volumes` | (DEPRECATED) Please use extraVolumes instead | `[]` |
| `persistence.mounts` | (DEPRECATED) Please use extraVolumeMounts instead | `[]` |
| `persistence.uid` | UID used for init-fs container | `1000` |
| `persistence.guid` | GUID used for init-fs container | `0` |
| `emptyDir` | Configuration of resources for `emptyDir` | `{}` |
| `hostPath.enabled` | Flag for enabling storage with `hostPath` | `false` |
| `hostPath.path` | Path where the data will be stored with `hostPath` | `""` |
| `hostPath.type` | `hostPath` volume types | `""` |

### JDBC Overwrite

Expand Down
6 changes: 5 additions & 1 deletion charts/sonarqube/templates/_pod.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -474,9 +474,13 @@ spec:
{{- if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ if .Values.persistence.existingClaim }}{{ .Values.persistence.existingClaim }}{{- else }}{{ include "sonarqube.fullname" . }}{{- end }}
{{- else if .Values.hostPath.enabled }}
hostPath:
path: {{ .Values.hostPath.path }}
type: {{ .Values.hostPath.type }}
{{- else }}
emptyDir: {{- toYaml .Values.emptyDir | nindent 8 }}
{{- end }}
{{- end }}
- name : tmp-dir
emptyDir: {{- toYaml .Values.emptyDir | nindent 8 }}
{{- if or .Values.sonarProperties .Values.sonarSecretProperties .Values.sonarSecretKey ( not .Values.elasticsearch.bootstrapChecks) }}
Expand Down
9 changes: 9 additions & 0 deletions charts/sonarqube/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,15 @@ emptyDir: {}
# medium: Memory
# sizeLimit: 16Mi

# In case you want to specify hostPath for to storage into the host.
hostPath:
enabled: false
# Path where the data will be stored.
#path: /data/sonarqube/
#Type of volume. Must be one of: DirectoryOrCreate, Directory, FileOrCreate, File, Socket, CharDevice, BlockDevice.
#type: DirectoryOrCreate


# A custom sonar.properties file can be provided via dictionary.
# For example:
# sonarProperties:
Expand Down
Loading
Loading