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

[bitnami/zookeeper] Expose appProtocol, scheme, and tlsConfig for Istio compatibility #29683

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
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
8 changes: 6 additions & 2 deletions bitnami/zookeeper/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# Changelog

## 13.4.14 (2024-09-23)
## 13.4.15 (2024-10-02)

* [bitnami/zookeeper] Drop unused `getValueFromSecret` local helper ([#29440](https://github.com/bitnami/charts/pull/29440))
* [bitnami/zookeeper] Expose appProtocol, scheme, and tlsConfig for Istio compatibility ([#29683](https://github.com/bitnami/charts/pull/29683))

## <small>13.4.14 (2024-09-23)</small>

* [bitnami/zookeeper] Drop unused `getValueFromSecret` local helper (#29440) ([630e4cb](https://github.com/bitnami/charts/commit/630e4cb5e4af4fda0bc633cd9ffe3930a93f13b3)), closes [#29440](https://github.com/bitnami/charts/issues/29440)

## <small>13.4.13 (2024-09-17)</small>

Expand Down
2 changes: 1 addition & 1 deletion bitnami/zookeeper/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ maintainers:
name: zookeeper
sources:
- https://github.com/bitnami/charts/tree/main/bitnami/zookeeper
version: 13.4.14
version: 13.4.15
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please bump minor version instead given you're adding new chart parameters

3 changes: 3 additions & 0 deletions bitnami/zookeeper/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ As an alternative, you can use any of the preset configurations for pod affinity
| `metrics.enabled` | Enable Prometheus to access ZooKeeper metrics endpoint | `false` |
| `metrics.service.type` | ZooKeeper Prometheus Exporter service type | `ClusterIP` |
| `metrics.service.port` | ZooKeeper Prometheus Exporter service port | `9141` |
| `metrics.service.appProtocol` | Optionally specify the ZooKeeper Prometheus Exporter service appProtocol | `""` |
| `metrics.service.annotations` | Annotations for Prometheus to auto-discover the metrics endpoint | `{}` |
| `metrics.serviceMonitor.enabled` | Create ServiceMonitor Resource for scraping metrics using Prometheus Operator | `false` |
| `metrics.serviceMonitor.namespace` | Namespace for the ServiceMonitor Resource (defaults to the Release Namespace) | `""` |
Expand All @@ -377,6 +378,8 @@ As an alternative, you can use any of the preset configurations for pod affinity
| `metrics.serviceMonitor.metricRelabelings` | MetricRelabelConfigs to apply to samples before ingestion | `[]` |
| `metrics.serviceMonitor.honorLabels` | Specify honorLabels parameter to add the scrape endpoint | `false` |
| `metrics.serviceMonitor.jobLabel` | The name of the label on the target service to use as the job name in prometheus. | `""` |
| `metrics.serviceMonitor.scheme` | The explicit scheme for metrics scraping. | `""` |
| `metrics.serviceMonitor.tlsConfig` | TLS configuration used for scrape endpoints used by Prometheus | `{}` |
| `metrics.prometheusRule.enabled` | Create a PrometheusRule for Prometheus Operator | `false` |
| `metrics.prometheusRule.namespace` | Namespace for the PrometheusRule Resource (defaults to the Release Namespace) | `""` |
| `metrics.prometheusRule.additionalLabels` | Additional labels that can be used so PrometheusRule will be discovered by Prometheus | `{}` |
Expand Down
3 changes: 3 additions & 0 deletions bitnami/zookeeper/templates/metrics-svc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ spec:
- name: tcp-metrics
port: {{ .Values.metrics.service.port }}
targetPort: metrics
{{- if .Values.metrics.service.appProtocol }}
appProtocol: {{ .Values.metrics.service.appProtocol }}
{{- end }}
Comment on lines +24 to +26
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we simply rename the port name to http-metrics?

{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.podLabels .Values.commonLabels ) "context" . ) }}
selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: zookeeper
Expand Down
6 changes: 6 additions & 0 deletions bitnami/zookeeper/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ spec:
{{- if .Values.metrics.serviceMonitor.honorLabels }}
honorLabels: {{ .Values.metrics.serviceMonitor.honorLabels }}
{{- end }}
{{- if .Values.metrics.serviceMonitor.scheme }}
scheme: {{ .Values.metrics.serviceMonitor.scheme }}
{{- end }}
{{- if .Values.metrics.serviceMonitor.tlsConfig }}
tlsConfig: {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.serviceMonitor.tlsConfig "context" $ ) | nindent 8 }}
{{- end }}
namespaceSelector:
matchNames:
- {{ template "zookeeper.namespace" . }}
Expand Down
15 changes: 15 additions & 0 deletions bitnami/zookeeper/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -826,6 +826,9 @@ metrics:
## @param metrics.service.port ZooKeeper Prometheus Exporter service port
##
port: 9141
## @param metrics.service.appProtocol Optionally specify the ZooKeeper Prometheus Exporter service appProtocol
##
appProtocol: ""
## @param metrics.service.annotations [object] Annotations for Prometheus to auto-discover the metrics endpoint
##
annotations:
Expand Down Expand Up @@ -868,6 +871,18 @@ metrics:
## @param metrics.serviceMonitor.jobLabel The name of the label on the target service to use as the job name in prometheus.
##
jobLabel: ""
## @param metrics.serviceMonitor.scheme The explicit scheme for metrics scraping.
##
scheme: ""
## @param metrics.serviceMonitor.tlsConfig [object] TLS configuration used for scrape endpoints used by Prometheus
## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#tlsconfig
## e.g:
## tlsConfig:
## ca:
## secret:
## name: existingSecretName
##
tlsConfig: {}
## Prometheus Operator PrometheusRule configuration
##
prometheusRule:
Expand Down
Loading