Skip to content

Commit 78833d6

Browse files
authored
[opensearch] serviceMonitor: add scheme and optional tlsConfig (#639)
* feat(serviceMonitor): add scheme and optional tlsConfig Signed-off-by: Toni Tauro <[email protected]> * fix(sm): trailing spaces Signed-off-by: Toni Tauro <[email protected]> * fix(values): trailing spaces Signed-off-by: Toni Tauro <[email protected]> * fix(version): bump to patchfix Signed-off-by: Toni Tauro <[email protected]> --------- Signed-off-by: Toni Tauro <[email protected]>
1 parent 74706b8 commit 78833d6

File tree

5 files changed

+27
-4
lines changed

5 files changed

+27
-4
lines changed

charts/opensearch/CHANGELOG.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1414
### Fixed
1515
### Security
1616
---
17+
## [2.30.1]
18+
### Added
19+
- Added scheme for serviceMonitor and optional tlsConfig
20+
### Changed
21+
### Deprecated
22+
### Removed
23+
### Fixed
24+
### Security
25+
---
1726
## [2.30.0]
1827
### Added
1928
- 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
557566
### Fixed
558567
### Security
559568

560-
[Unreleased]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.30.0...HEAD
561-
[2.29.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.29.0...opensearch-2.30.0
569+
[Unreleased]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.30.1...HEAD
570+
[2.30.1]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.30.0...opensearch-2.30.1
571+
[2.30.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.29.0...opensearch-2.30.0
562572
[2.29.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.28.0...opensearch-2.29.0
563573
[2.28.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.27.1...opensearch-2.28.0
564574
[2.27.1]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.27.0...opensearch-2.27.1

charts/opensearch/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 2.30.0
18+
version: 2.30.1
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to

charts/opensearch/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ helm uninstall my-release
132132
| `serviceMonitor.basicAuth.existingSecret` | When using basicAuth for the serviceMonitor, use an existing secret | `""` |
133133
| `serviceMonitor.basicAuth.username` | Username to be used for basic auth | `""` |
134134
| `serviceMonitor.basicAuth.password` | Password to be used for basic auth | `""` |
135+
| `serviceMonitor.scheme` | scheme to be used for scraping the metrics | `"http"` |
136+
| `serviceMonitor.tlsConfig` | optional tlsConfig to be used for scraping | `{}` |
135137

136138
[anti-affinity]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
137139
[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

charts/opensearch/templates/serviceMonitor.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,14 @@ spec:
1717
- port: {{ .Values.service.httpPortName | default "http" }}
1818
interval: {{ .Values.serviceMonitor.interval }}
1919
path: {{ .Values.serviceMonitor.path }}
20+
scheme: {{ .Values.serviceMonitor.scheme }}
21+
{{- with .Values.serviceMonitor.tlsConfig }}
22+
tlsConfig:
23+
{{- toYaml . | nindent 8 }}
24+
{{- end }}
2025
{{- if .Values.serviceMonitor.basicAuth.enabled }}
2126
basicAuth:
22-
username:
27+
username:
2328
{{- if .Values.serviceMonitor.basicAuth.existingSecret }}
2429
name: {{ .Values.serviceMonitor.basicAuth.existingSecret }}
2530
{{- else }}

charts/opensearch/values.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -550,6 +550,9 @@ serviceMonitor:
550550
# Ensure this matches your OpenSearch service configuration.
551551
path: /_prometheus/metrics
552552

553+
# Scheme to use for scraping.
554+
scheme: http
555+
553556
# Frequency at which Prometheus will scrape metrics.
554557
# Adjust based on your needs.
555558
interval: 10s
@@ -559,6 +562,9 @@ serviceMonitor:
559562
# k8s.example.com/prometheus: kube-prometheus
560563
labels: {}
561564

565+
# additional tlsConfig to be added to the ServiceMonitor
566+
tlsConfig: {}
567+
562568
# Basic Auth configuration for the service monitor
563569
# You can either use existingSecret, which expects a secret to be already present with data.username and data.password
564570
# or set the credentials over the helm values, making helm create a secret for you

0 commit comments

Comments
 (0)