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

Community PR to fix PDB typo on top of #402 #411

Merged
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
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 @@ -6,6 +6,7 @@ All changes to this chart will be documented in this file.
* Improve the description of deprecated `ApplicationNodes.jvmOpts` and `ApplicationNodes.jvmCeOpts` values
* Run the initSysctl init-container as root to prevent 'permission denied' issues
* Add revisionHistoryLimit configuration for SonarQube application Deployment ReplicaSets
* Introduce `ApplicationNodes.podDistributionBudget` and `searchNodes.podDistributionBudget` in place of deprecated `ApplicationNodes.podDistributionBudget` and `searchNodes.podDistributionBudget`.

## [10.3.0]
* Upgrade SonarQube to 10.3.0
Expand Down
2 changes: 2 additions & 0 deletions charts/sonarqube-dce/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ annotations:
description: "Run the initSysctl init-container as root to prevent 'permission denied' issues"
- kind: changed
description: "Add revisionHistoryLimit configuration for SonarQube application Deployment ReplicaSets"
- kind: deprecated
description: "Introduce `ApplicationNodes.podDistributionBudget` and `searchNodes.podDistributionBudget` in place of deprecated `ApplicationNodes.podDistributionBudget` and `searchNodes.podDistributionBudget`"
artifacthub.io/links: |
- name: support
url: https://community.sonarsource.com/
Expand Down
4 changes: 2 additions & 2 deletions charts/sonarqube-dce/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ The following table lists the configurable parameters of the SonarQube chart and
| `searchNodes.searchAuthentication.keyStorePasswordSecret` | Existing secret for Password to Keystore/Truststore used in search nodes (optional) | `nil` |
| `searchNodes.searchAuthentication.userPassword` | A User Password that will be used to authenticate against the Search Cluster | `""` |
| `searchNodes.replicaCount` | Replica count of the Search Nodes | `3` |
| `searchNodes.podDistributionBudget` | PodDisruptionBudget for the Search Nodes | `minAvailable: 2` |
| `searchNodes.podDisruptionBudget` | PodDisruptionBudget for the Search Nodes | `minAvailable: 2` |
| `searchNodes.securityContext.fsGroup` | Group applied to mounted directories/files on search nodes | `1000` |
| `searchNodes.containerSecurityContext` | SecurityContext for search container in sonarqube pod | [Restricted podSecurityStandard](#kubernetes---pod-security-standards) |
| `searchNodes.readinessProbe.initialDelaySeconds` | ReadinessProbe initial delay for Search Node checking | `60` |
Expand Down Expand Up @@ -235,7 +235,7 @@ The following table lists the configurable parameters of the SonarQube chart and
| `ApplicationNodes.sonarSecretProperties` | Additional `sonar.properties` key-value pairs for App Nodes to load from a secret | `None` |
| `ApplicationNodes.sonarSecretKey` | Name of existing secret used for settings encryption | `None` |
| `ApplicationNodes.replicaCount` | Replica count of the app Nodes | `2` |
| `ApplicationNodes.podDistributionBudget` | PodDisruptionBudget for the App Nodes | `minAvailable: 1` |
| `ApplicationNodes.podDisruptionBudget` | PodDisruptionBudget for the App Nodes | `minAvailable: 1` |
| `ApplicationNodes.securityContext.fsGroup` | Group applied to mounted directories/files on app nodes | `1000` |
| `ApplicationNodes.containerSecurityContext` | SecurityContext for app container in sonarqube pod | [Restricted podSecurityStandard](#kubernetes---pod-security-standards) |
| `ApplicationNodes.readinessProbe.initialDelaySeconds` | ReadinessProbe initial delay for app Node checking | `60` |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,18 @@ metadata:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
{{- with .Values.searchNodes.podDistributionBudget }}
{{ toYaml . | indent 2 }}
{{- end }}
{{ if .Values.searchNodes.podDistributionBudget }}
{{- with .Values.searchNodes.podDistributionBudget -}}
{{ toYaml . | indent 2 -}}
{{ end -}}
{{ else }}
{{- with .Values.searchNodes.podDisruptionBudget -}}
{{ toYaml . | indent 2 -}}
{{ end }}
{{ end }}
selector:
matchLabels:
sonarqube.datacenter/type: "search"

---
apiVersion: {{ include "common.capabilities.policy.apiVersion" . }}
kind: PodDisruptionBudget
Expand All @@ -27,9 +32,15 @@ metadata:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
{{- with .Values.ApplicationNodes.podDistributionBudget }}
{{ toYaml . | indent 2 }}
{{- end }}
{{ if .Values.ApplicationNodes.podDistributionBudget }}
{{- with .Values.ApplicationNodes.podDistributionBudget -}}
{{ toYaml . | indent 2 -}}
{{ end -}}
{{ else }}
{{- with .Values.ApplicationNodes.podDisruptionBudget -}}
{{ toYaml . | indent 2 -}}
{{ end }}
{{ end }}
selector:
matchLabels:
sonarqube.datacenter/type: "app"
sonarqube.datacenter/type: "app"
26 changes: 25 additions & 1 deletion charts/sonarqube-dce/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,32 @@
"$comment": "(DEPRECATED) please use sonarWebContext at the value top level"
}
}
},
"podDisruptionBudget": {
"type": "object",
"deprecated": true,
"$comment": "PodDisruptionBudget for the Application Nodes"
},
"podDistributionBudget": {
"type": "object",
"deprecated": true,
"$comment": "(DEPRECATED) Please use ApplicationNodes.podDisruptionBudget"
}
}
},
"searchNodes": {
"properties": {
"podDisruptionBudget": {
"type": "object",
"deprecated": false,
"$comment": "PodDisruptionBudget for the Search Nodes"
},
"podDistributionBudget": {
"type": "object",
"deprecated": true,
"$comment": "(DEPRECATED) Please use SearchNodes.podDisruptionBudget"
}
}
}
}
}
}
8 changes: 4 additions & 4 deletions charts/sonarqube-dce/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ searchNodes:

replicaCount: 3

# Pod Distribution Budget for search nodes
podDistributionBudget:
# Pod Disruption Budget for search nodes
podDisruptionBudget:
minAvailable: 2

# Set security context for sonarqube search pods
Expand Down Expand Up @@ -175,8 +175,8 @@ ApplicationNodes:
# How many revisions to retain (Deployment ReplicaSets)
revisionHistoryLimit: 10

# Pod Distribution Budget for app nodes
podDistributionBudget:
# Pod Disruption Budget for app nodes
podDisruptionBudget:
minAvailable: 1

# Set security context for sonarqube app pods
Expand Down