Skip to content

Commit

Permalink
SONAR-23395 Make the automountServiceAccountToken configurable in Pod…
Browse files Browse the repository at this point in the history
…Spec
  • Loading branch information
carminevassallo committed Nov 15, 2024
1 parent 1dce6a6 commit a5db585
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 6 deletions.
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.
* Update the Chart's icon with the SonarQube Server logo
* Fix ENV variables not fetched when using extraConfig.configmaps
* Support Gateway on different namespace in HTTPRoute
* Make the `automountServiceAccountToken` configurable with `serviceAccount.automountToken` in PodSpec

## [10.7.0]
* Update Chart's version to 10.7.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 @@ -39,6 +39,8 @@ annotations:
description: "Fix ENV variables not fetched when using extraConfig.configmaps"
- kind: added
description: "Support Gateway on different namespace in HTTPRoute"
- kind: fixed
description: "Make the 'automountServiceAccountToken' configurable with 'serviceAccount.automountToken' in PodSpec"
artifacthub.io/links: |
- name: support
url: https://community.sonarsource.com/
Expand Down
2 changes: 1 addition & 1 deletion charts/sonarqube-dce/templates/sonarqube-application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ spec:
{{ toYaml . | indent 8 }}
{{- end }}
spec:
automountServiceAccountToken: false
automountServiceAccountToken: {{ .Values.serviceAccount.automountToken | default "false" }}
{{- if or .Values.ApplicationNodes.image.pullSecrets .Values.ApplicationNodes.image.pullSecret }}
imagePullSecrets:
{{- if .Values.ApplicationNodes.image.pullSecret }}
Expand Down
2 changes: 1 addition & 1 deletion charts/sonarqube-dce/templates/sonarqube-search.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ spec:
{{ toYaml . | indent 8 }}
{{- end }}
spec:
automountServiceAccountToken: false
automountServiceAccountToken: {{ .Values.serviceAccount.automountToken | default "false" }}
{{- if or .Values.searchNodes.image.pullSecrets .Values.searchNodes.image.pullSecret }}
imagePullSecrets:
{{- if .Values.searchNodes.image.pullSecret }}
Expand Down
1 change: 1 addition & 0 deletions charts/sonarqube/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ All changes to this chart will be documented in this file.
* Update the Chart's icon with the SonarQube Server logo
* Set `app.kubernetes.io/name` and `app.kubernetes.io/version` as selector labels
* Support Gateway on different namespace in HTTPRoute
* Make the `automountServiceAccountToken` configurable with `serviceAccount.automountToken` in PodSpec

## [10.7.0]
* Update Chart's version to 10.7.0
Expand Down
2 changes: 2 additions & 0 deletions charts/sonarqube/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ annotations:
description: "Set 'app.kubernetes.io/name' and 'app.kubernetes.io/version' as selector labels"
- kind: added
description: "Support Gateway on different namespace in HTTPRoute"
- kind: fixed
description: "Make the 'automountServiceAccountToken' configurable with 'serviceAccount.automountToken' in PodSpec"
artifacthub.io/containsSecurityUpdates: "false"
artifacthub.io/images: |
- name: sonarqube
Expand Down
2 changes: 1 addition & 1 deletion charts/sonarqube/templates/_pod.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ metadata:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
automountServiceAccountToken: false
automountServiceAccountToken: {{ .Values.serviceAccount.automountToken | default "false" }}
{{- with .Values.schedulerName }}
schedulerName: {{ . }}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ metadata:
chart: sonarqube-10.8.0
release: serviceaccount-values.yaml
heritage: Helm
automountServiceAccountToken: false
automountServiceAccountToken: true
---
# Source: sonarqube/charts/postgresql/templates/secrets.yaml
apiVersion: v1
Expand Down Expand Up @@ -423,7 +423,7 @@ spec:
app.kubernetes.io/name: serviceaccount-values.yaml
app.kubernetes.io/version: "10.7.0-community"
spec:
automountServiceAccountToken: false
automountServiceAccountToken: true
securityContext:
fsGroup: 0
initContainers:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ serviceAccount:
annotations:
myAnnotation: tutu
accountToken: azndnqnzaeoeae=
name: myserviceaccount
name: myserviceaccount
automountToken: true

0 comments on commit a5db585

Please sign in to comment.