From 632886705daddac04c4f039a69981fac8351c57a Mon Sep 17 00:00:00 2001 From: Toni Tauro Date: Fri, 3 Jan 2025 13:46:32 +0100 Subject: [PATCH 1/4] feat(serviceMonitor): add scheme and optional tlsConfig Signed-off-by: Toni Tauro --- charts/opensearch/CHANGELOG.md | 14 ++++++++++++-- charts/opensearch/Chart.yaml | 2 +- charts/opensearch/README.md | 2 ++ charts/opensearch/templates/serviceMonitor.yaml | 5 +++++ charts/opensearch/values.yaml | 6 ++++++ 5 files changed, 26 insertions(+), 3 deletions(-) diff --git a/charts/opensearch/CHANGELOG.md b/charts/opensearch/CHANGELOG.md index 89c63825..cea0a848 100644 --- a/charts/opensearch/CHANGELOG.md +++ b/charts/opensearch/CHANGELOG.md @@ -14,6 +14,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed ### Security --- +## [2.31.0] +### Added +- Added scheme for serviceMonitor and optional tlsConfig +### Changed +### Deprecated +### Removed +### Fixed +### Security +--- ## [2.30.0] ### Added - Added plugins.removeList to allow remove plugins @@ -557,8 +566,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed ### Security -[Unreleased]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.30.0...HEAD -[2.29.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.29.0...opensearch-2.30.0 +[Unreleased]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.31.0...HEAD +[2.31.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.30.0...opensearch-2.31.0 +[2.30.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.29.0...opensearch-2.30.0 [2.29.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.28.0...opensearch-2.29.0 [2.28.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.27.1...opensearch-2.28.0 [2.27.1]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.27.0...opensearch-2.27.1 diff --git a/charts/opensearch/Chart.yaml b/charts/opensearch/Chart.yaml index 809a7cff..913d84b4 100644 --- a/charts/opensearch/Chart.yaml +++ b/charts/opensearch/Chart.yaml @@ -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: 2.30.0 +version: 2.31.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 diff --git a/charts/opensearch/README.md b/charts/opensearch/README.md index cb3561ed..d32292c8 100644 --- a/charts/opensearch/README.md +++ b/charts/opensearch/README.md @@ -132,6 +132,8 @@ helm uninstall my-release | `serviceMonitor.basicAuth.existingSecret` | When using basicAuth for the serviceMonitor, use an existing secret | `""` | | `serviceMonitor.basicAuth.username` | Username to be used for basic auth | `""` | | `serviceMonitor.basicAuth.password` | Password to be used for basic auth | `""` | +| `serviceMonitor.scheme` | scheme to be used for scraping the metrics | `"http"` | +| `serviceMonitor.tlsConfig` | optional tlsConfig to be used for scraping | `{}` | [anti-affinity]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity [environment from variables]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#configure-all-key-value-pairs-in-a-configmap-as-container-environment-variables diff --git a/charts/opensearch/templates/serviceMonitor.yaml b/charts/opensearch/templates/serviceMonitor.yaml index 85bdd011..a04b7f63 100644 --- a/charts/opensearch/templates/serviceMonitor.yaml +++ b/charts/opensearch/templates/serviceMonitor.yaml @@ -17,6 +17,11 @@ spec: - port: {{ .Values.service.httpPortName | default "http" }} interval: {{ .Values.serviceMonitor.interval }} path: {{ .Values.serviceMonitor.path }} + scheme: {{ .Values.serviceMonitor.scheme }} + {{- with .Values.serviceMonitor.tlsConfig }} + tlsConfig: + {{- toYaml . | nindent 8 }} + {{- end }} {{- if .Values.serviceMonitor.basicAuth.enabled }} basicAuth: username: diff --git a/charts/opensearch/values.yaml b/charts/opensearch/values.yaml index 76373736..5b406974 100644 --- a/charts/opensearch/values.yaml +++ b/charts/opensearch/values.yaml @@ -550,6 +550,9 @@ serviceMonitor: # Ensure this matches your OpenSearch service configuration. path: /_prometheus/metrics + # Scheme to use for scraping. + scheme: http + # Frequency at which Prometheus will scrape metrics. # Adjust based on your needs. interval: 10s @@ -558,6 +561,9 @@ serviceMonitor: # labels: # k8s.example.com/prometheus: kube-prometheus labels: {} + + # additional tlsConfig to be added to the ServiceMonitor + tlsConfig: {} # Basic Auth configuration for the service monitor # You can either use existingSecret, which expects a secret to be already present with data.username and data.password From 71df7fb26b307c053ee81e95dc8f0c779e763d78 Mon Sep 17 00:00:00 2001 From: Toni Tauro Date: Fri, 3 Jan 2025 13:53:47 +0100 Subject: [PATCH 2/4] fix(sm): trailing spaces Signed-off-by: Toni Tauro --- charts/opensearch/templates/serviceMonitor.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/opensearch/templates/serviceMonitor.yaml b/charts/opensearch/templates/serviceMonitor.yaml index a04b7f63..0abda693 100644 --- a/charts/opensearch/templates/serviceMonitor.yaml +++ b/charts/opensearch/templates/serviceMonitor.yaml @@ -19,12 +19,12 @@ spec: path: {{ .Values.serviceMonitor.path }} scheme: {{ .Values.serviceMonitor.scheme }} {{- with .Values.serviceMonitor.tlsConfig }} - tlsConfig: + tlsConfig: {{- toYaml . | nindent 8 }} {{- end }} {{- if .Values.serviceMonitor.basicAuth.enabled }} basicAuth: - username: + username: {{- if .Values.serviceMonitor.basicAuth.existingSecret }} name: {{ .Values.serviceMonitor.basicAuth.existingSecret }} {{- else }} From 4f9d11b50d8d6b24acac3a050c6e7d89aef96c8f Mon Sep 17 00:00:00 2001 From: Toni Tauro Date: Fri, 3 Jan 2025 13:55:18 +0100 Subject: [PATCH 3/4] fix(values): trailing spaces Signed-off-by: Toni Tauro --- charts/opensearch/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/opensearch/values.yaml b/charts/opensearch/values.yaml index 5b406974..9a52b920 100644 --- a/charts/opensearch/values.yaml +++ b/charts/opensearch/values.yaml @@ -561,7 +561,7 @@ serviceMonitor: # labels: # k8s.example.com/prometheus: kube-prometheus labels: {} - + # additional tlsConfig to be added to the ServiceMonitor tlsConfig: {} From 38c99d07310c279284fa4cf1d9f282f99da4c328 Mon Sep 17 00:00:00 2001 From: Toni Tauro Date: Mon, 6 Jan 2025 07:47:30 +0100 Subject: [PATCH 4/4] fix(version): bump to patchfix Signed-off-by: Toni Tauro --- charts/opensearch/CHANGELOG.md | 6 +++--- charts/opensearch/Chart.yaml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/charts/opensearch/CHANGELOG.md b/charts/opensearch/CHANGELOG.md index cea0a848..79d42e2f 100644 --- a/charts/opensearch/CHANGELOG.md +++ b/charts/opensearch/CHANGELOG.md @@ -14,7 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed ### Security --- -## [2.31.0] +## [2.30.1] ### Added - Added scheme for serviceMonitor and optional tlsConfig ### Changed @@ -566,8 +566,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed ### Security -[Unreleased]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.31.0...HEAD -[2.31.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.30.0...opensearch-2.31.0 +[Unreleased]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.30.1...HEAD +[2.30.1]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.30.0...opensearch-2.30.1 [2.30.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.29.0...opensearch-2.30.0 [2.29.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.28.0...opensearch-2.29.0 [2.28.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.27.1...opensearch-2.28.0 diff --git a/charts/opensearch/Chart.yaml b/charts/opensearch/Chart.yaml index 913d84b4..e9591d3d 100644 --- a/charts/opensearch/Chart.yaml +++ b/charts/opensearch/Chart.yaml @@ -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: 2.31.0 +version: 2.30.1 # 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