Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport 1.x] Add Service Monitor Resource #578

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion charts/opensearch-dashboards/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

---
## [Unreleased]
### Added
Expand All @@ -12,6 +14,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
### Security
---
## [1.23.0]
### Added
- Added `ServiceMonitor` support for Prometheus monitoring
- Added `protocol` setting in `Service` metrics
### Changed
### Deprecated
### Removed
### Fixed
### Security
---
## [1.22.0]
### Added
### Changed
Expand Down Expand Up @@ -475,7 +487,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-1.22.0...HEAD
[Unreleased]: https://github.com/opensearch-project/helm-charts/compare/opensearch-dashboards-1.23.0...HEAD
[1.23.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.22.0...opensearch-1.23.0
[1.22.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.21.0...opensearch-1.22.0
[1.21.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.20.0...opensearch-1.21.0
[1.20.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.19.0...opensearch-1.20.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: 1.22.0
version: 1.23.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
184 changes: 112 additions & 72 deletions charts/opensearch-dashboards/README.md

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions charts/opensearch-dashboards/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ spec:
protocol: TCP
name: {{ .Values.service.httpPortName | default "http" }}
targetPort: {{ .Values.service.port }}
- name: {{ .Values.service.metricsPortName | default "metrics" }}
protocol: TCP
port: {{ .Values.service.metricsPort }}
selector:
app: {{ .Chart.Name }}
release: {{ .Release.Name | quote }}
17 changes: 17 additions & 0 deletions charts/opensearch-dashboards/templates/serviceMonitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{{- if .Values.serviceMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ template "opensearch-dashboards.fullname" . }}-service-monitor
namespace: {{ .Release.Namespace }}
labels:
{{- include "opensearch-dashboards.labels" . | nindent 4 }}
spec:
selector:
matchLabels:
{{- include "opensearch-dashboards.selectorLabels" . | nindent 6 }}
endpoints:
- port: {{ .Values.service.metricsPortName | default "metrics" }}
interval: {{ .Values.serviceMonitor.interval }}
path: {{ .Values.serviceMonitor.path }}
{{- end }}
16 changes: 16 additions & 0 deletions charts/opensearch-dashboards/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,15 @@ service:
# ipFamilies:
# - IPv4
port: 5601
metricsPort: 9601
loadBalancerIP: ""
nodePort: ""
labels: {}
annotations: {}
loadBalancerSourceRanges: []
# 0.0.0.0/0
httpPortName: http
metricsPortName: metrics

ingress:
enabled: false
Expand Down Expand Up @@ -270,3 +272,17 @@ plugins:
enabled: false
installList: []
# - example-fake-plugin-downloadable-url

# ServiceMonitor Configuration for Prometheus
# Enabling this option will create a ServiceMonitor resource that allows Prometheus to scrape metrics from the OpenSearch service.
serviceMonitor:
# Set to true to enable the ServiceMonitor resource for OpenSearch Dashboards
enabled: false

# HTTP path where metrics are exposed by OpenSearch Dashboards.
# Ensure this path is correctly set in your service.
path: /_prometheus/metrics

# Frequency at which Prometheus will scrape metrics.
# Modify as needed for your monitoring requirements.
interval: 10s
15 changes: 14 additions & 1 deletion charts/opensearch/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

---
## [Unreleased]
### Added
Expand All @@ -12,6 +14,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
### Security
---
## [1.30.0]
### Added
- Added `ServiceMonitor` support for Prometheus monitoring
- Added `protocol` setting in `Service` metrics
### Changed
### Deprecated
### Removed
### Fixed
### Security
---
## [1.29.0]
### Added
### Changed
Expand Down Expand Up @@ -717,7 +729,8 @@ config:
### Fixed
### Security

[Unreleased]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.29.0...HEAD
[Unreleased]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.30.0...HEAD
[1.30.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.29.0...opensearch-1.30.0
[1.29.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.28.1...opensearch-1.29.0
[1.28.1]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.28.0...opensearch-1.28.1
[1.28.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.27.0...opensearch-1.28.0
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: 1.29.0
version: 1.30.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
Loading
Loading