Skip to content
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
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ test-helm: verify-helm-docs ## Test Helm charts (lint, template, validate, kubec
--set broker.type=googlepubsub \
--set broker.googlepubsub.subscriptionId=test-sub \
--set broker.googlepubsub.topic=test-topic \
--set serviceMonitor.enabled=true \
--set monitoring.serviceMonitor.enabled=true \
--api-versions monitoring.coreos.com/v1/ServiceMonitor) \
&& echo "$$output" | grep -q 'kind: ServiceMonitor' \
|| { echo "ERROR: ServiceMonitor not rendered"; exit 1; }; \
Expand All @@ -237,7 +237,7 @@ test-helm: verify-helm-docs ## Test Helm charts (lint, template, validate, kubec
--set broker.type=googlepubsub \
--set broker.googlepubsub.subscriptionId=test-sub \
--set broker.googlepubsub.topic=test-topic \
--set serviceMonitor.enabled=true) \
--set monitoring.serviceMonitor.enabled=true) \
&& ! echo "$$output" | grep -q 'kind: ServiceMonitor' \
|| { echo "ERROR: ServiceMonitor rendered without CRD"; exit 1; }; \
echo "$$output" | $(call gotool,kubeconform) $(KUBECONFORM_FLAGS)
Expand All @@ -253,7 +253,7 @@ test-helm: verify-helm-docs ## Test Helm charts (lint, template, validate, kubec
--set broker.type=googlepubsub \
--set broker.googlepubsub.subscriptionId=test-sub \
--set broker.googlepubsub.topic=test-topic \
--set serviceMonitor.enabled=false \
--set monitoring.serviceMonitor.enabled=false \
--api-versions monitoring.coreos.com/v1/ServiceMonitor) \
&& ! echo "$$output" | grep -q 'kind: ServiceMonitor' \
|| { echo "ERROR: ServiceMonitor rendered while disabled"; exit 1; }; \
Expand Down
2 changes: 1 addition & 1 deletion charts/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: hyperfleet-adapter
description: HyperFleet Adapter - Event-driven adapter services for HyperFleet cluster provisioning
type: application
version: 2.1.0
version: 2.2.0

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

Release this values API change as a major chart version.

This PR moves serviceMonitor.* and tracing.* under monitoring.*. Existing values files that use the old keys will silently stop enabling monitoring or tracing. Preserve the old keys with a compatibility shim, or release this change as 3.0.0 and document the migration. Semantic Versioning requires a major increment for backward-incompatible public API changes. (semver.org)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@charts/Chart.yaml` at line 5, Update the chart version from 2.2.0 to 3.0.0 in
Chart.yaml to mark the serviceMonitor.* and tracing.* to monitoring.* values
migration as a backward-incompatible API change.

appVersion: "0.0.0-dev"
maintainers:
- name: HyperFleet Team
Expand Down
39 changes: 21 additions & 18 deletions charts/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# hyperfleet-adapter

![Version: 2.1.0](https://img.shields.io/badge/Version-2.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.0.0-dev](https://img.shields.io/badge/AppVersion-0.0.0--dev-informational?style=flat-square)
![Version: 2.2.0](https://img.shields.io/badge/Version-2.2.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.0.0-dev](https://img.shields.io/badge/AppVersion-0.0.0--dev-informational?style=flat-square)

HyperFleet Adapter - Event-driven adapter services for HyperFleet cluster provisioning

Expand Down Expand Up @@ -126,23 +126,26 @@ helm install hyperfleet-adapter oci://REGISTRY/hyperfleet-adapter \
| strategy.type | string | `"RollingUpdate"` | Strategy type (`RollingUpdate` or `Recreate`) |
| terminationGracePeriodSeconds | int | `30` | Termination grace period in seconds |
| tolerations | list | `[]` | Tolerations for pod scheduling |
| serviceMonitor | object | `{"enabled":true,"honorLabels":true,"interval":"30s","labels":{},"metricRelabeling":[],"namespace":"","namespaceSelector":{},"scrapeTimeout":"10s"}` | ServiceMonitor for Prometheus Operator scrape configuration. Defaults to enabled. On clusters without Prometheus Operator CRDs, the resource is silently skipped. |
| serviceMonitor.enabled | bool | `true` | Create a ServiceMonitor resource |
| serviceMonitor.interval | string | `"30s"` | Scrape interval |
| serviceMonitor.scrapeTimeout | string | `"10s"` | Scrape timeout (must be less than interval) |
| serviceMonitor.labels | object | `{}` | Additional labels for ServiceMonitor discovery |
| serviceMonitor.honorLabels | bool | `true` | Honor labels from the target to avoid overwriting |
| serviceMonitor.metricRelabeling | list | `[]` | Metric relabel configs applied before ingestion |
| serviceMonitor.namespaceSelector | object | `{}` | Namespace selector for cross-namespace monitoring |
| serviceMonitor.namespace | string | `""` | Override the namespace where ServiceMonitor is created (defaults to release namespace) |
| tracing | object | `{"enabled":false,"otlpEndpoint":"","otlpProtocol":"grpc","propagators":"tracecontext,baggage","sampler":"parentbased_traceidratio","samplerArg":"1.0","serviceName":"hyperfleet-adapter"}` | Distributed tracing configuration (OpenTelemetry) |
| tracing.enabled | bool | `false` | Enable trace export |
| tracing.serviceName | string | `"hyperfleet-adapter"` | Service name reported in traces |
| tracing.otlpEndpoint | string | `""` | OTLP exporter endpoint (traces go to stdout when empty) |
| tracing.otlpProtocol | string | `"grpc"` | OTLP protocol (`grpc` or `http/protobuf`) |
| tracing.sampler | string | `"parentbased_traceidratio"` | Sampler type |
| tracing.samplerArg | string | `"1.0"` | Sampling rate (`1.0` for dev, `0.01` for production) |
| tracing.propagators | string | `"tracecontext,baggage"` | Context propagation formats |
| monitoring | object | `{"dashboard":{"enabled":false},"serviceMonitor":{"enabled":false,"honorLabels":true,"interval":"30s","labels":{},"metricRelabeling":[],"namespace":"","namespaceSelector":{},"scrapeTimeout":"10s"},"tracing":{"enabled":false,"otlpEndpoint":"","otlpProtocol":"grpc","propagators":"tracecontext,baggage","sampler":"parentbased_always_on","samplerArg":"","serviceName":"hyperfleet-adapter"}}` | Monitoring and observability configuration |
| monitoring.serviceMonitor | object | `{"enabled":false,"honorLabels":true,"interval":"30s","labels":{},"metricRelabeling":[],"namespace":"","namespaceSelector":{},"scrapeTimeout":"10s"}` | ServiceMonitor for Prometheus Operator scrape configuration. Disabled by default. On clusters without Prometheus Operator CRDs, the resource is silently skipped. |
| monitoring.serviceMonitor.enabled | bool | `false` | Create a ServiceMonitor resource |
| monitoring.serviceMonitor.interval | string | `"30s"` | Scrape interval |
| monitoring.serviceMonitor.scrapeTimeout | string | `"10s"` | Scrape timeout (must be less than interval) |
| monitoring.serviceMonitor.labels | object | `{}` | Additional labels for ServiceMonitor discovery |
| monitoring.serviceMonitor.honorLabels | bool | `true` | Honor labels from the target to avoid overwriting |
| monitoring.serviceMonitor.metricRelabeling | list | `[]` | Metric relabel configs applied before ingestion |
| monitoring.serviceMonitor.namespaceSelector | object | `{}` | Namespace selector for cross-namespace monitoring |
| monitoring.serviceMonitor.namespace | string | `""` | Override the namespace where ServiceMonitor is created (defaults to release namespace) |
| monitoring.dashboard | object | `{"enabled":false}` | Grafana dashboard provisioning via sidecar ConfigMap |
| monitoring.dashboard.enabled | bool | `false` | Create a ConfigMap with the Grafana dashboard JSON |
| monitoring.tracing | object | `{"enabled":false,"otlpEndpoint":"","otlpProtocol":"grpc","propagators":"tracecontext,baggage","sampler":"parentbased_always_on","samplerArg":"","serviceName":"hyperfleet-adapter"}` | Distributed tracing configuration (OpenTelemetry) |
| monitoring.tracing.enabled | bool | `false` | Enable trace export |
| monitoring.tracing.serviceName | string | `"hyperfleet-adapter"` | Service name reported in traces |
| monitoring.tracing.otlpEndpoint | string | `""` | OTLP exporter endpoint (traces go to stdout when empty) |
| monitoring.tracing.otlpProtocol | string | `"grpc"` | OTLP protocol (`grpc` or `http/protobuf`) |
| monitoring.tracing.sampler | string | `"parentbased_always_on"` | Sampler type |
| monitoring.tracing.samplerArg | string | `""` | Sampling rate (only used with ratio-based samplers) |
| monitoring.tracing.propagators | string | `"tracecontext,baggage"` | Context propagation formats |
Comment thread
coderabbitai[bot] marked this conversation as resolved.

----------------------------------------------
Autogenerated from chart metadata using [helm-docs](https://github.com/norwoodj/helm-docs)
12 changes: 12 additions & 0 deletions charts/templates/configmap-dashboard.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{{- if .Values.monitoring.dashboard.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "hyperfleet-adapter.fullname" . }}-grafana-dashboard
labels:
{{- include "hyperfleet-adapter.labels" . | nindent 4 }}
grafana_dashboard: "1"
data:
hyperfleet-adapter.json: |-
{{- .Files.Get "dashboards/hyperfleet-adapter.json" | nindent 4 }}
{{- end }}
2 changes: 1 addition & 1 deletion charts/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ spec:
- name: HYPERFLEET_BROKER_TOPIC
value: {{ .Values.broker.googlepubsub.topic | quote }}
{{- end }}
{{- with .Values.tracing }}
{{- with .Values.monitoring.tracing }}
- name: HYPERFLEET_TRACING_ENABLED
value: {{ .enabled | quote }}
{{- if .enabled }}
Expand Down
22 changes: 11 additions & 11 deletions charts/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
{{- if and .Values.serviceMonitor.enabled (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1/ServiceMonitor") }}
{{- if and .Values.monitoring.serviceMonitor.enabled (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1/ServiceMonitor") }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "hyperfleet-adapter.fullname" . }}
{{- if .Values.serviceMonitor.namespace | trim }}
namespace: {{ .Values.serviceMonitor.namespace | trim }}
{{- if .Values.monitoring.serviceMonitor.namespace | trim }}
namespace: {{ .Values.monitoring.serviceMonitor.namespace | trim }}
{{- else }}
namespace: {{ .Release.Namespace }}
{{- end }}
labels:
{{- include "hyperfleet-adapter.labels" . | nindent 4 }}
{{- with .Values.serviceMonitor.labels }}
{{- with .Values.monitoring.serviceMonitor.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
selector:
matchLabels:
{{- include "hyperfleet-adapter.selectorLabels" . | nindent 6 }}
{{- if not (empty .Values.serviceMonitor.namespaceSelector) }}
{{- if not (empty .Values.monitoring.serviceMonitor.namespaceSelector) }}
namespaceSelector:
{{- toYaml .Values.serviceMonitor.namespaceSelector | nindent 4 }}
{{- else if .Values.serviceMonitor.namespace | trim }}
{{- toYaml .Values.monitoring.serviceMonitor.namespaceSelector | nindent 4 }}
{{- else if .Values.monitoring.serviceMonitor.namespace | trim }}
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
{{- end }}
endpoints:
- port: metrics
path: /metrics
interval: {{ .Values.serviceMonitor.interval }}
scrapeTimeout: {{ .Values.serviceMonitor.scrapeTimeout }}
honorLabels: {{ .Values.serviceMonitor.honorLabels }}
{{- with .Values.serviceMonitor.metricRelabeling }}
interval: {{ .Values.monitoring.serviceMonitor.interval }}
scrapeTimeout: {{ .Values.monitoring.serviceMonitor.scrapeTimeout }}
honorLabels: {{ .Values.monitoring.serviceMonitor.honorLabels }}
{{- with .Values.monitoring.serviceMonitor.metricRelabeling }}
metricRelabelings:
{{- toYaml . | nindent 8 }}
{{- end }}
Expand Down
154 changes: 85 additions & 69 deletions charts/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -860,82 +860,98 @@
"type": "object"
}
},
"serviceMonitor": {
"monitoring": {
"type": "object",
"description": "ServiceMonitor for Prometheus Operator discovery",
"description": "Monitoring and observability configuration",
"properties": {
"enabled": {
"type": "boolean",
"description": "Enable ServiceMonitor creation (requires monitoring.coreos.com CRDs)"
},
"interval": {
"type": "string",
"description": "Scrape interval (e.g. 30s)"
},
"scrapeTimeout": {
"type": "string",
"description": "Scrape timeout, must be less than interval (e.g. 10s)"
},
"labels": {
"serviceMonitor": {
"type": "object",
"description": "Additional labels for ServiceMonitor"
},
"honorLabels": {
"type": "boolean",
"description": "Honor labels from the target"
},
"metricRelabeling": {
"type": "array",
"description": "Metric relabel configs",
"items": {
"type": "object"
"description": "ServiceMonitor for Prometheus Operator discovery",
"properties": {
"enabled": {
"type": "boolean",
"description": "Enable ServiceMonitor creation (requires monitoring.coreos.com CRDs)"
},
"interval": {
"type": "string",
"description": "Scrape interval (e.g. 30s)"
},
"scrapeTimeout": {
"type": "string",
"description": "Scrape timeout, must be less than interval (e.g. 10s)"
},
"labels": {
"type": "object",
"description": "Additional labels for ServiceMonitor"
},
"honorLabels": {
"type": "boolean",
"description": "Honor labels from the target"
},
"metricRelabeling": {
"type": "array",
"description": "Metric relabel configs",
"items": {
"type": "object"
}
},
"namespaceSelector": {
"type": "object",
"description": "Namespace selector for cross-namespace monitoring"
},
"namespace": {
"type": "string",
"description": "Override namespace where ServiceMonitor is created"
}
}
},
"namespaceSelector": {
"dashboard": {
"type": "object",
"description": "Namespace selector for cross-namespace monitoring"
},
"namespace": {
"type": "string",
"description": "Override namespace where ServiceMonitor is created"
}
}
},
"tracing": {
"type": "object",
"description": "OpenTelemetry tracing configuration",
"properties": {
"enabled": {
"type": "boolean",
"description": "Enable OpenTelemetry tracing"
},
"serviceName": {
"type": "string",
"description": "OTEL_SERVICE_NAME value"
},
"otlpEndpoint": {
"type": "string",
"description": "OTLP exporter endpoint"
},
"otlpProtocol": {
"type": "string",
"description": "OTLP protocol",
"enum": [
"grpc",
"http/protobuf"
]
},
"sampler": {
"type": "string",
"description": "Sampler type"
},
"samplerArg": {
"type": "string",
"description": "Sampling rate (1.0 for dev, 0.01 for production)"
"description": "Grafana dashboard provisioning via sidecar ConfigMap",
"properties": {
"enabled": {
"type": "boolean",
"description": "Create a ConfigMap with the Grafana dashboard JSON"
}
}
},
"propagators": {
"type": "string",
"description": "Trace context propagators (comma-separated)"
"tracing": {
"type": "object",
"description": "OpenTelemetry tracing configuration",
"properties": {
"enabled": {
"type": "boolean",
"description": "Enable OpenTelemetry tracing"
},
"serviceName": {
"type": "string",
"description": "OTEL_SERVICE_NAME value"
},
"otlpEndpoint": {
"type": "string",
"description": "OTLP exporter endpoint"
},
"otlpProtocol": {
"type": "string",
"description": "OTLP protocol",
"enum": [
"grpc",
"http/protobuf"
]
},
"sampler": {
"type": "string",
"description": "Sampler type"
},
"samplerArg": {
"type": "string",
"description": "Sampling rate (only used with ratio-based samplers)"
},
"propagators": {
"type": "string",
"description": "Trace context propagators (comma-separated)"
}
}
}
}
}
Expand Down
Loading