From 36f3b9223185ef2498ad2f6602aa703aef963a57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Cotineau?= Date: Mon, 13 Nov 2023 17:01:16 +0100 Subject: [PATCH] SQDEVOPS-309 add default annotation compatible with new nginx major * SQDEVOPS-309 modify changelog message, as nginx is a major bump * SQDEVOPS-309 add default annotation compatible with new nginx major --- charts/sonarqube-dce/CHANGELOG.md | 2 +- charts/sonarqube-dce/Chart.yaml | 2 +- charts/sonarqube-dce/README.md | 2 +- charts/sonarqube-dce/templates/NOTES.txt | 3 +++ charts/sonarqube-dce/templates/ingress.yaml | 4 ++-- charts/sonarqube/CHANGELOG.md | 2 +- charts/sonarqube/Chart.yaml | 2 +- charts/sonarqube/README.md | 2 +- charts/sonarqube/templates/NOTES.txt | 3 +++ charts/sonarqube/templates/ingress.yaml | 2 +- 10 files changed, 15 insertions(+), 9 deletions(-) diff --git a/charts/sonarqube-dce/CHANGELOG.md b/charts/sonarqube-dce/CHANGELOG.md index 225828995..7d0a986f1 100644 --- a/charts/sonarqube-dce/CHANGELOG.md +++ b/charts/sonarqube-dce/CHANGELOG.md @@ -15,7 +15,7 @@ All changes to this chart will be documented in this file. * Support Kubernetes v1.28 * Avoid duplicate SONAR_WEB_SYSTEMPASSCODE secrets * Deprecate embedded PostgreSQL -* Update nginx-ingress-controller dependency to version 4.8.3 +* Update nginx-ingress-controller dependency to version 4.8.3, please carefully read the changelog of this new major version. ## [10.2.0] * Update SonarQube to 10.2.0 diff --git a/charts/sonarqube-dce/Chart.yaml b/charts/sonarqube-dce/Chart.yaml index 0ad3c94d1..4f31fad78 100644 --- a/charts/sonarqube-dce/Chart.yaml +++ b/charts/sonarqube-dce/Chart.yaml @@ -54,7 +54,7 @@ annotations: - kind: deprecated description: "Deprecate embedded PostgreSQL" - kind: changed - description: "Update nginx-ingress-controller dependency to version 4.8.3" + description: "Update nginx-ingress-controller dependency to version 4.8.3, please carefully read the changelog of this new major version." artifacthub.io/links: | - name: support url: https://community.sonarsource.com/ diff --git a/charts/sonarqube-dce/README.md b/charts/sonarqube-dce/README.md index 195167f23..271913c53 100644 --- a/charts/sonarqube-dce/README.md +++ b/charts/sonarqube-dce/README.md @@ -355,7 +355,7 @@ The following table lists the configurable parameters of the SonarQube chart and | `ingress.hosts[0].servicePort` | Optional field to override the default servicePort of a path | `None` | | `ingress.tls` | Ingress secrets for TLS certificates | `[]` | | `ingress.ingressClassName` | Optional field to configure ingress class name | `None` | -| `ingress.annotations` | Field to add extra annotations to the ingress | {`nginx.ingress.kubernetes.io/proxy-body-size=64m`} if `nginx.enabled=true` | +| `ingress.annotations` | Field to add extra annotations to the ingress | {`nginx.org/proxy-body-size: "64m"`} if `nginx.enabled=true` | ### InitContainers diff --git a/charts/sonarqube-dce/templates/NOTES.txt b/charts/sonarqube-dce/templates/NOTES.txt index 8ea40fc9c..4207e9594 100644 --- a/charts/sonarqube-dce/templates/NOTES.txt +++ b/charts/sonarqube-dce/templates/NOTES.txt @@ -21,3 +21,6 @@ WARNING: The embedded PostgreSQL is intended for evaluation only, it is DEPRECATED, and it will be REMOVED in a future release. Please visit https://artifacthub.io/packages/helm/sonarqube/sonarqube#production-use-case for more information. {{- end }} +{{ if .Values.nginx.enabled }} +WARNING: The ingress nginx controller dependeny has been upgraded to a major version (4.x), please carefully read the changelogs [here](https://github.com/kubernetes/ingress-nginx/releases) and [here](https://artifacthub.io/packages/helm/ingress-nginx/ingress-nginx?modal=changelog). +{{- end }} \ No newline at end of file diff --git a/charts/sonarqube-dce/templates/ingress.yaml b/charts/sonarqube-dce/templates/ingress.yaml index 2fa97c8b4..250b738d1 100644 --- a/charts/sonarqube-dce/templates/ingress.yaml +++ b/charts/sonarqube-dce/templates/ingress.yaml @@ -18,8 +18,8 @@ metadata: {{- range $key, $value := .Values.ingress.annotations }} {{ $key }}: {{ $value | quote }} {{- end }} - {{- if and .Values.nginx.enabled (not (hasKey (.Values.ingress.annotations) "nginx.ingress.kubernetes.io/proxy-body-size")) }} - nginx.ingress.kubernetes.io/proxy-body-size: "64m" + {{- if and .Values.nginx.enabled (not (hasKey (.Values.ingress.annotations) "nginx.org/proxy-body-size/proxy-body-size")) }} + nginx.org/proxy-body-size: "64m" {{- end -}} {{- end }} spec: diff --git a/charts/sonarqube/CHANGELOG.md b/charts/sonarqube/CHANGELOG.md index ca76f1d1e..67b7c306c 100644 --- a/charts/sonarqube/CHANGELOG.md +++ b/charts/sonarqube/CHANGELOG.md @@ -14,7 +14,7 @@ All changes to this chart will be documented in this file. * Support Kubernetes v1.28 * Avoid duplicate SONAR_WEB_SYSTEMPASSCODE secrets * Deprecate embedded PostgreSQL -* Update nginx-ingress-controller dependency to version 4.8.3 +* Update nginx-ingress-controller dependency to version 4.8.3, please carefully read the changelog of this new major version. ## [10.2.0] * Update SonarQube to 10.2.0 diff --git a/charts/sonarqube/Chart.yaml b/charts/sonarqube/Chart.yaml index 1d87bcb07..b1fb97509 100644 --- a/charts/sonarqube/Chart.yaml +++ b/charts/sonarqube/Chart.yaml @@ -57,7 +57,7 @@ annotations: - kind: deprecated description: "Deprecate embedded PostgreSQL" - kind: changed - description: "Update nginx-ingress-controller dependency to version 4.8.3" + description: "Update nginx-ingress-controller dependency to version 4.8.3, please carefully read the changelog of this new major version." artifacthub.io/containsSecurityUpdates: "false" artifacthub.io/images: | - name: sonarqube diff --git a/charts/sonarqube/README.md b/charts/sonarqube/README.md index ab999216c..843930f63 100644 --- a/charts/sonarqube/README.md +++ b/charts/sonarqube/README.md @@ -258,7 +258,7 @@ The following table lists the configurable parameters of the SonarQube chart and | `ingress.hosts[0].servicePort` | Optional field to override the default servicePort of a path | `None` | | `ingress.tls` | Ingress secrets for TLS certificates | `[]` | | `ingress.ingressClassName` | Optional field to configure ingress class name | `None` | -| `ingress.annotations` | Field to add extra annotations to the ingress | {`nginx.ingress.kubernetes.io/proxy-body-size=64m`} if `nginx.enabled=true` | +| `ingress.annotations` | Field to add extra annotations to the ingress | {`nginx.org/proxy-body-size: "64m"`} if `nginx.enabled=true` | ### Route diff --git a/charts/sonarqube/templates/NOTES.txt b/charts/sonarqube/templates/NOTES.txt index 56638e793..7f1fee404 100644 --- a/charts/sonarqube/templates/NOTES.txt +++ b/charts/sonarqube/templates/NOTES.txt @@ -24,3 +24,6 @@ WARNING: The embedded PostgreSQL is intended for evaluation only, it is DEPRECATED, and it will be REMOVED in a future release. Please visit https://artifacthub.io/packages/helm/sonarqube/sonarqube#production-use-case for more information. {{- end }} +{{ if .Values.nginx.enabled }} +WARNING: The ingress nginx controller dependeny has been upgraded to a major version (4.x), please carefully read the changelogs [here](https://github.com/kubernetes/ingress-nginx/releases) and [here](https://artifacthub.io/packages/helm/ingress-nginx/ingress-nginx?modal=changelog). +{{- end }} \ No newline at end of file diff --git a/charts/sonarqube/templates/ingress.yaml b/charts/sonarqube/templates/ingress.yaml index 4d01bb5b8..9def87f0b 100644 --- a/charts/sonarqube/templates/ingress.yaml +++ b/charts/sonarqube/templates/ingress.yaml @@ -19,7 +19,7 @@ metadata: {{ $key }}: {{ $value | quote }} {{- end }} {{- if and .Values.nginx.enabled (not (hasKey (.Values.ingress.annotations) "nginx.ingress.kubernetes.io/proxy-body-size")) }} - nginx.ingress.kubernetes.io/proxy-body-size: "64m" + nginx.org/proxy-body-size: "64m" {{- end -}} {{- end }} spec: