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

[opensearch] serviceMonitor: add scheme and optional tlsConfig #639

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
14 changes: 12 additions & 2 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.30.1]
### Added
- Added scheme for serviceMonitor and optional tlsConfig
### Changed
### Deprecated
### Removed
### Fixed
### Security
---
## [2.30.0]
### Added
- Added plugins.removeList to allow remove plugins
Expand Down Expand Up @@ -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.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
[2.27.1]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.27.0...opensearch-2.27.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.30.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
Expand Down
2 changes: 2 additions & 0 deletions charts/opensearch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 6 additions & 1 deletion charts/opensearch/templates/serviceMonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,14 @@ 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:
username:
{{- if .Values.serviceMonitor.basicAuth.existingSecret }}
name: {{ .Values.serviceMonitor.basicAuth.existingSecret }}
{{- else }}
Expand Down
6 changes: 6 additions & 0 deletions charts/opensearch/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -559,6 +562,9 @@ serviceMonitor:
# 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
# or set the credentials over the helm values, making helm create a secret for you
Expand Down
Loading