Skip to content

Commit

Permalink
feat(serviceMonitors): add option of additional Labels in serviceMoni…
Browse files Browse the repository at this point in the history
…tor (#586)

* feat(serviceMonitors): add option of additional Labels in serviceMonitor

Signed-off-by: Toni Tauro <toni.tauro@adfinis.com>

* fix(CHANGELOG): add new release

Signed-off-by: Toni Tauro <toni.tauro@adfinis.com>

* doc(values): add examples

Signed-off-by: Toni Tauro <toni.tauro@adfinis.com>

* fix(CHANGELOG): correct formatting

Signed-off-by: Toni Tauro <toni.tauro@adfinis.com>

---------

Signed-off-by: Toni Tauro <toni.tauro@adfinis.com>
  • Loading branch information
eyenx committed Sep 9, 2024
1 parent 3317f5b commit 10646b1
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 11 deletions.
13 changes: 11 additions & 2 deletions charts/opensearch-dashboards/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.22.0]
### Added
- Ability to add additional `labels` to `serviceMonitor`
### Changed
### Deprecated
### Removed
### Fixed
### Security
---
## [2.21.2]
### Added
### Changed
Expand Down Expand Up @@ -149,7 +158,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Removed
### Fixed
### Security

---
## [2.11.1]
### Added
Expand Down Expand Up @@ -386,7 +394,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-dashboards-2.21.2...HEAD
[Unreleased]: https://github.com/opensearch-project/helm-charts/compare/opensearch-dashboards-2.22.0...HEAD
[2.22.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-dashboards-2.21.1...opensearch-dashboards-2.22.0
[2.21.2]: https://github.com/opensearch-project/helm-charts/compare/opensearch-dashboards-2.21.1...opensearch-dashboards-2.21.2
[2.21.1]: https://github.com/opensearch-project/helm-charts/compare/opensearch-dashboards-2.21.0...opensearch-dashboards-2.21.1
[2.21.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-dashboards-2.20.0...opensearch-dashboards-2.21.0
Expand Down
2 changes: 1 addition & 1 deletion charts/opensearch-dashboards/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.21.2
version: 2.22.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
Expand Down
3 changes: 3 additions & 0 deletions charts/opensearch-dashboards/templates/serviceMonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ metadata:
namespace: {{ .Release.Namespace }}
labels:
{{- include "opensearch-dashboards.labels" . | nindent 4 }}
{{- with .Values.serviceMonitor.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
selector:
matchLabels:
Expand Down
5 changes: 5 additions & 0 deletions charts/opensearch-dashboards/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -292,3 +292,8 @@ serviceMonitor:
# Frequency at which Prometheus will scrape metrics.
# Modify as needed for your monitoring requirements.
interval: 10s

# additional labels to be added to the ServiceMonitor
# labels:
# k8s.example.com/prometheus: kube-prometheus
labels: {}
21 changes: 14 additions & 7 deletions 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.24.0]
### Added
- Ability to add additional `labels` to `serviceMonitor`
### Changed
### Deprecated
### Removed
### Fixed
### Security
---
## [2.23.2]
### Added
- Metrics configuration in both `Service` templates
Expand Down Expand Up @@ -48,7 +57,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Deprecated
### Removed
### Fixed
- Fixed opensearchJavaOpts defaults in README
- Fixed opensearchJavaOpts defaults in README
### Security
---
## [2.22.0]
Expand All @@ -60,7 +69,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
### Security
---

## [2.21.0]
### Added
- Updated OpenSearch appVersion to 2.15.0
Expand Down Expand Up @@ -91,8 +99,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [2.18.0]
### Added
### Breaking
- Requires an initial admin password to be setup starting from App Version OpenSearch 2.12.0. Refer this github issue: https://github.com/opensearch-project/security/issues/3622
- Updated OpenSearch appVersion to 2.12.0
- Requires an initial admin password to be setup starting from App Version OpenSearch 2.12.0. Refer this github issue: https://github.com/opensearch-project/security/issues/3622
- Updated OpenSearch appVersion to 2.12.0
### Changed
### Deprecated
### Removed
Expand Down Expand Up @@ -468,8 +476,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.23.2...HEAD
[Unreleased]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.24.0...HEAD
[2.24.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.23.1...opensearch-2.24.0
[2.23.2]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.23.1...opensearch-2.23.2
[2.23.1]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.23.0...opensearch-2.23.1
[2.23.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.22.1...opensearch-2.23.0
Expand Down Expand Up @@ -517,4 +525,3 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[2.2.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.1.0...opensearch-2.2.0
[2.1.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.0.1...opensearch-2.1.0
[2.0.1]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.0.0...opensearch-2.0.1

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.23.2
version: 2.24.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
Expand Down
3 changes: 3 additions & 0 deletions charts/opensearch/templates/serviceMonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ metadata:
namespace: {{ .Release.Namespace }}
labels:
{{- include "opensearch.labels" . | nindent 4 }}
{{- with .Values.serviceMonitor.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
selector:
matchLabels:
Expand Down
5 changes: 5 additions & 0 deletions charts/opensearch/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -543,3 +543,8 @@ serviceMonitor:
# Frequency at which Prometheus will scrape metrics.
# Adjust based on your needs.
interval: 10s

# additional labels to be added to the ServiceMonitor
# labels:
# k8s.example.com/prometheus: kube-prometheus
labels: {}

0 comments on commit 10646b1

Please sign in to comment.