Skip to content

Commit

Permalink
feat(chart/opensearch): add ability for serviceMonitor basicauth
Browse files Browse the repository at this point in the history
Signed-off-by: Toni Tauro <toni.tauro@adfinis.com>
  • Loading branch information
eyenx committed Dec 13, 2024
1 parent 8d802b8 commit 642e18b
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 2 deletions.
12 changes: 11 additions & 1 deletion charts/opensearch/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
### Security
---
## [2.28.0]
### Added
- Ability to set a basic auth configuration to the `serviceMonitor`
### Changed
### Deprecated
### Removed
### Fixed
### Security
---
## [2.27.1]
### Added
### Changed
Expand Down Expand Up @@ -530,7 +539,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.27.1...HEAD
[Unreleased]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.28.0...HEAD
[2.28.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.27.0...opensearch-2.28.0
[2.27.1]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.27.0...opensearch-2.27.1
[2.27.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.26.1...opensearch-2.27.0
[2.26.1]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.26.0...opensearch-2.26.1
Expand Down
2 changes: 1 addition & 1 deletion charts/opensearch/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.27.1
version: 2.28.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
Expand Down
9 changes: 9 additions & 0 deletions charts/opensearch/templates/serviceMonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,13 @@ spec:
- port: {{ .Values.service.metricsPortName | default "metrics" }}
interval: {{ .Values.serviceMonitor.interval }}
path: {{ .Values.serviceMonitor.path }}
{{- if .Values.serviceMonitor.basicAuth }}
basicAuth:
username:
name: {{ .Values.serviceMonitor.basicAuth.username.secretName}}
key: {{ .Values.serviceMonitor.basicAuth.username.secretKey}}
password:
name: {{ .Values.serviceMonitor.basicAuth.password.secretName}}
key: {{ .Values.serviceMonitor.basicAuth.password.secretKey}}
{{- end }}
{{- end }}
10 changes: 10 additions & 0 deletions charts/opensearch/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -550,3 +550,13 @@ serviceMonitor:
# labels:
# k8s.example.com/prometheus: kube-prometheus
labels: {}

# Basic Auth configuration for the service monitor
# basicAuth:
# username:
# secretName: credentials
# secretKey: username
# password:
# secretName: credentials
# secretKey: password
basicAuth: {}

0 comments on commit 642e18b

Please sign in to comment.