From da89ca9c916b317c1a88c27696fa5a0ae5632763 Mon Sep 17 00:00:00 2001 From: Quentin Bisson Date: Mon, 21 Sep 2026 20:44:37 +0200 Subject: [PATCH 1/2] feat(helm): add PodMonitors for the workloads that serve metrics Six workloads serve a Prometheus endpoint on a pod port and nothing collects any of them. ate-api-server, atelet, the atenet router, the atenet egress and the k8s credential provider start the metrics server in serverboot; ate-controller serves controller-runtime's own on :8080, its default, since its ctrl.Options sets no Metrics field. The router and the egress each add a second port for their agentgateway container. Three of those pods carry prometheus.io/* annotations, which a Prometheus reads only when it is configured for pod-annotation discovery. A Prometheus Operator installation discovers PodMonitors instead and ignores the annotations, so on such an installation every one of these endpoints is served and none is collected. Add one PodMonitor per workload, off by default because the object needs the monitoring.coreos.com/v1 CRDs. The port name and the pod label are pinned per workload: no two metrics sources agree on the port name, and the credential provider's label is the substrate.fullname helper's output rather than the bare component name. A wrong name or label yields a monitor that matches nothing and reports no error. podcertificate-controller gets no monitor. It emits no metrics, which docs/metrics/substrate.yaml records under blind_spots. Run the new chart unit tests in helm-verify, which had no way to run them. Signed-off-by: Quentin Bisson Signed-off-by: QuentinBisson --- charts/substrate/templates/podmonitor.yaml | 98 +++++++++++ charts/substrate/tests/podmonitor_test.yaml | 183 ++++++++++++++++++++ charts/substrate/values.yaml | 22 +++ 3 files changed, 303 insertions(+) create mode 100644 charts/substrate/templates/podmonitor.yaml create mode 100644 charts/substrate/tests/podmonitor_test.yaml diff --git a/charts/substrate/templates/podmonitor.yaml b/charts/substrate/templates/podmonitor.yaml new file mode 100644 index 0000000000..af2a7956cd --- /dev/null +++ b/charts/substrate/templates/podmonitor.yaml @@ -0,0 +1,98 @@ +{{/* +Copyright 2026 Google LLC + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/}} +{{/* +One PodMonitor per workload that serves metrics. Six do, from three sources, +and no two agree on the port name: + + ate-api-server, atelet, the atenet router, the atenet egress and the + Kubernetes credential provider start the metrics server themselves + (serverboot's StartMetricsServer). The first two name that port `prometheus`, + the other three name it `metrics`. + + ate-controller serves controller-runtime's own metrics server. Its + ctrl.Options sets no Metrics field, and only BindAddress "0" disables that + server, so it binds the default :8080 — the port its pod already declares as + `metrics`. This endpoint carries the controller_runtime_* and workqueue_* + families that docs/metrics/substrate.yaml lists under + bridged_metric_families. + + The router and the egress each run an agentgateway container of their own, + serving its stats on a second port: `gw-metrics` on the router, `stats` on + the egress. Those are the gateway's own metrics rather than the ate + registry's, and they are as uncollected as the rest, so each of those two + monitors carries both endpoints. + +Only the first three carry prometheus.io/* annotations, and an annotation is +read only by a Prometheus configured for pod-annotation discovery. A Prometheus +Operator installation discovers PodMonitors instead and ignores annotations, so +without these objects every one of these endpoints is served and none is +collected. + +A PodMonitor addresses a NAMED container port, so the name is per workload: one +shared name would match some pods and silently miss the others. The pod label +is per workload too — each carries a bare `app: ` except the +credential provider, whose label is the substrate.fullname helper's output and +so depends on the release name. + +podcertificate-controller gets no monitor: it emits no metrics, which +docs/metrics/substrate.yaml states under blind_spots. + +One object per workload rather than one selecting several: an interval and a +relabeling are a component's own, and the atelet is a DaemonSet whose series +are per node. +*/}} +{{- if .Values.metrics.podMonitor.enabled }} +{{- $components := list + (dict "app" "ate-api-server" "ports" (list "prometheus")) + (dict "app" "ate-controller" "ports" (list "metrics")) + (dict "app" "atelet" "ports" (list "prometheus")) + (dict "app" "atenet-egress" "ports" (list "metrics" "stats")) + (dict "app" "atenet-router" "ports" (list "metrics" "gw-metrics")) + (dict "app" "k8s-credential-provider" "ports" (list "metrics") "fullnameLabel" true) +}} +{{- range $components }} +{{- $label := .app }} +{{- if .fullnameLabel }} +{{- $label = include "substrate.fullname" (list .app $) }} +{{- end }} +--- +apiVersion: monitoring.coreos.com/v1 +kind: PodMonitor +metadata: + name: {{ include "substrate.fullname" (list .app $) }} + namespace: {{ $.Release.Namespace }} + labels: + app: {{ $label }} + {{- with $.Values.metrics.podMonitor.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + selector: + matchLabels: + app: {{ $label }} + namespaceSelector: + matchNames: + - {{ $.Release.Namespace }} + podMetricsEndpoints: + {{- range .ports }} + - port: {{ . }} + path: /metrics + {{- with $.Values.metrics.podMonitor.interval }} + interval: {{ . }} + {{- end }} + {{- end }} +{{- end }} +{{- end }} diff --git a/charts/substrate/tests/podmonitor_test.yaml b/charts/substrate/tests/podmonitor_test.yaml new file mode 100644 index 0000000000..f166c124c8 --- /dev/null +++ b/charts/substrate/tests/podmonitor_test.yaml @@ -0,0 +1,183 @@ +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# The PodMonitors of the six workloads that serve metrics. Two things here are +# easy to get wrong and silent when wrong, so each is pinned per workload: +# +# the port NAME, because a PodMonitor addresses a named container port and no +# two sources agree — ate-api-server and atelet name theirs `prometheus`, the +# others `metrics`, and the agentgateway sidecars of the router and the +# egress add `gw-metrics` and `stats`; +# +# the pod LABEL, because every workload carries a bare `app: ` +# except the credential provider, whose label is the substrate.fullname +# helper's output and so depends on the release name. +# +# A wrong name or label yields a monitor that matches nothing, and no error. +suite: metrics PodMonitors +templates: +- podmonitor.yaml +tests: +- it: renders nothing by default + asserts: + - hasDocuments: + count: 0 + +- it: renders one PodMonitor per workload that serves metrics + set: + metrics.podMonitor.enabled: true + asserts: + - hasDocuments: + count: 6 + +- it: addresses the port name ate-api-server's pod declares + set: + metrics.podMonitor.enabled: true + documentIndex: 0 + asserts: + - isKind: + of: PodMonitor + - equal: + path: spec.selector.matchLabels.app + value: ate-api-server + - equal: + path: spec.podMetricsEndpoints[0].port + value: prometheus + - equal: + path: spec.podMetricsEndpoints[0].path + value: /metrics + +- it: addresses ate-controller's controller-runtime metrics port + set: + metrics.podMonitor.enabled: true + documentIndex: 1 + asserts: + - equal: + path: spec.selector.matchLabels.app + value: ate-controller + - equal: + path: spec.podMetricsEndpoints[0].port + value: metrics + +- it: addresses the port name the atelet's pod declares + set: + metrics.podMonitor.enabled: true + documentIndex: 2 + asserts: + - equal: + path: spec.selector.matchLabels.app + value: atelet + - equal: + path: spec.podMetricsEndpoints[0].port + value: prometheus + +- it: scrapes both the egress ext-proc and its agentgateway sidecar + set: + metrics.podMonitor.enabled: true + documentIndex: 3 + asserts: + - equal: + path: spec.selector.matchLabels.app + value: atenet-egress + - equal: + path: spec.podMetricsEndpoints[0].port + value: metrics + - equal: + path: spec.podMetricsEndpoints[1].port + value: stats + +- it: scrapes both the router and its agentgateway sidecar + set: + metrics.podMonitor.enabled: true + documentIndex: 4 + asserts: + - equal: + path: spec.selector.matchLabels.app + value: atenet-router + - equal: + path: spec.podMetricsEndpoints[0].port + value: metrics + - equal: + path: spec.podMetricsEndpoints[1].port + value: gw-metrics + +# The credential provider's pod label is the substrate.fullname helper's +# output, not the bare component name: bare under the canonical release name +# `substrate`, release-prefixed under any other. Both are pinned, because a +# label that does not track the helper yields a monitor matching nothing. +- it: selects the credential provider by the bare name under the canonical release + set: + metrics.podMonitor.enabled: true + release: + name: substrate + documentIndex: 5 + asserts: + - equal: + path: spec.selector.matchLabels.app + value: k8s-credential-provider + - equal: + path: spec.podMetricsEndpoints[0].port + value: metrics + +- it: selects the credential provider by the prefixed name under any other release + set: + metrics.podMonitor.enabled: true + release: + name: ate + documentIndex: 5 + asserts: + - equal: + path: metadata.name + value: ate-k8s-credential-provider + - equal: + path: spec.selector.matchLabels.app + value: ate-k8s-credential-provider + +- it: scopes every monitor to the release namespace + set: + metrics.podMonitor.enabled: true + release: + namespace: ate-system + asserts: + - equal: + path: metadata.namespace + value: ate-system + - equal: + path: spec.namespaceSelector.matchNames[0] + value: ate-system + +- it: leaves the interval out when it is unset, so Prometheus' own default holds + set: + metrics.podMonitor.enabled: true + asserts: + - notExists: + path: spec.podMetricsEndpoints[0].interval + +- it: carries the interval on every endpoint, and the discovery labels + set: + metrics.podMonitor.enabled: true + metrics.podMonitor.interval: 60s + metrics.podMonitor.labels: + release: prometheus + documentIndex: 4 + asserts: + - equal: + path: spec.podMetricsEndpoints[0].interval + value: 60s + - equal: + path: spec.podMetricsEndpoints[1].interval + value: 60s + - equal: + path: metadata.labels.release + value: prometheus diff --git a/charts/substrate/values.yaml b/charts/substrate/values.yaml index f93e88d5cd..021bd5a128 100644 --- a/charts/substrate/values.yaml +++ b/charts/substrate/values.yaml @@ -210,6 +210,28 @@ credentialProvider: # Mounted via envFrom with optional=true. Created by the chart from these values. ateApiServerEnvVarsConfigMap: ate-api-server-envvars +# Prometheus metrics. Six workloads serve /metrics on a pod port: ate-api-server, +# atelet, the atenet router, the atenet egress and the credential provider start +# the metrics server themselves, and ate-controller serves controller-runtime's +# own on :8080, its default. The router and the egress each add a second port for +# their agentgateway container's stats. +# +# Only the first three carry prometheus.io/* annotations, which a Prometheus reads +# only when it does pod-annotation discovery. A Prometheus Operator installation +# discovers PodMonitors instead, so turn these on there or every endpoint is +# served and none is collected. +metrics: + podMonitor: + # Requires the monitoring.coreos.com/v1 CRDs. Off by default: the object + # does not apply on a cluster without the Prometheus Operator. + enabled: false + # Scrape interval. Empty leaves Prometheus' own default. + interval: "" + # Labels on every PodMonitor. Set whatever the Prometheus' or the agent's + # podMonitorSelector matches on, and any tenant label a multi-tenant + # backend routes by. + labels: {} + # OTLP export, following the OpenTelemetry SDK environment variable spec. # endpoint applies to every signal; a signal's own endpoint overrides it. # A signal exports only when it is enabled and resolves to an endpoint. From af901fddf3fdd512eac311768e3a30e030d61f8e Mon Sep 17 00:00:00 2001 From: QuentinBisson Date: Thu, 26 Nov 2026 10:46:49 +0100 Subject: [PATCH 2/2] feat(helm): add atelet's PodMonitor to the substrate-atelet chart With atelet.enabled=false, atelet runs from the substrate-atelet chart, and the substrate chart still rendered a monitor for it. Both charts name that monitor after the substrate release, so the two releases would fight over one object. The substrate chart now renders the atelet and credential provider monitors only when it renders those workloads. The substrate-atelet chart takes the same metrics.podMonitor values and renders atelet's. helm-verify runs the unit tests of all three charts. The PodMonitor files take the repo's copyright header. Signed-off-by: QuentinBisson --- .github/workflows/helm-verify.yaml | 2 +- charts/substrate-atelet/README.md | 4 ++ .../templates/podmonitor.yaml | 44 ++++++++++++ .../tests/podmonitor_test.yaml | 70 +++++++++++++++++++ charts/substrate-atelet/values.yaml | 10 +++ charts/substrate/README.md | 3 + charts/substrate/templates/podmonitor.yaml | 24 ++++--- charts/substrate/tests/podmonitor_test.yaml | 26 ++++++- 8 files changed, 170 insertions(+), 13 deletions(-) create mode 100644 charts/substrate-atelet/templates/podmonitor.yaml create mode 100644 charts/substrate-atelet/tests/podmonitor_test.yaml diff --git a/.github/workflows/helm-verify.yaml b/.github/workflows/helm-verify.yaml index 9c9a16d92d..fd47524717 100644 --- a/.github/workflows/helm-verify.yaml +++ b/.github/workflows/helm-verify.yaml @@ -36,4 +36,4 @@ jobs: - name: Install helm-unittest run: .github/scripts/helm-verify/install-helm-unittest.sh - name: Run the chart unit tests - run: helm unittest charts/substrate + run: helm unittest charts/substrate charts/substrate-podcert charts/substrate-atelet diff --git a/charts/substrate-atelet/README.md b/charts/substrate-atelet/README.md index 4f756e6b0b..29386053d7 100644 --- a/charts/substrate-atelet/README.md +++ b/charts/substrate-atelet/README.md @@ -61,6 +61,10 @@ release grants permissions to the atelet ServiceAccount by name. atelet also uses it to reach that release's API server. Names other than `substrate` prefix each object with the release name, for example `team-atelet`. +`metrics.podMonitor` takes the same keys as in the substrate chart and renders +atelet's `PodMonitor`. The substrate chart renders that monitor only while +it renders atelet. + ## Existing installs Upgrading the substrate release with `atelet.enabled=false` deletes atelet. diff --git a/charts/substrate-atelet/templates/podmonitor.yaml b/charts/substrate-atelet/templates/podmonitor.yaml new file mode 100644 index 0000000000..a8b8bd94b7 --- /dev/null +++ b/charts/substrate-atelet/templates/podmonitor.yaml @@ -0,0 +1,44 @@ +{{/* +Copyright 2026 The Agent Substrate Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/}} +{{/* +atelet's PodMonitor, as the substrate chart renders it when atelet.enabled is +true. atelet serves its metrics on the `prometheus` port. +*/}} +{{- if .Values.metrics.podMonitor.enabled }} +apiVersion: monitoring.coreos.com/v1 +kind: PodMonitor +metadata: + name: {{ include "substrate.fullname" (list "atelet" .) }} + namespace: {{ .Release.Namespace }} + labels: + app: atelet + {{- with .Values.metrics.podMonitor.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + selector: + matchLabels: + app: atelet + namespaceSelector: + matchNames: + - {{ .Release.Namespace }} + podMetricsEndpoints: + - port: prometheus + path: /metrics + {{- with .Values.metrics.podMonitor.interval }} + interval: {{ . }} + {{- end }} +{{- end }} diff --git a/charts/substrate-atelet/tests/podmonitor_test.yaml b/charts/substrate-atelet/tests/podmonitor_test.yaml new file mode 100644 index 0000000000..8454a75ae7 --- /dev/null +++ b/charts/substrate-atelet/tests/podmonitor_test.yaml @@ -0,0 +1,70 @@ +# Copyright 2026 The Agent Substrate Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +suite: atelet PodMonitor +templates: +- podmonitor.yaml +tests: +- it: renders nothing by default + asserts: + - hasDocuments: + count: 0 + +- it: selects the atelet pods on their prometheus port + set: + metrics.podMonitor.enabled: true + release: + namespace: ate-system + asserts: + - isKind: + of: PodMonitor + - equal: + path: metadata.name + value: atelet + - equal: + path: spec.selector.matchLabels.app + value: atelet + - equal: + path: spec.namespaceSelector.matchNames[0] + value: ate-system + - equal: + path: spec.podMetricsEndpoints[0].port + value: prometheus + - notExists: + path: spec.podMetricsEndpoints[0].interval + +# The name follows substrateReleaseName, like every other atelet object, so it +# matches the monitor the substrate chart renders when it owns atelet. +- it: names the monitor after the substrate release + set: + metrics.podMonitor.enabled: true + substrateReleaseName: team + asserts: + - equal: + path: metadata.name + value: team-atelet + +- it: carries the interval and the discovery labels + set: + metrics.podMonitor.enabled: true + metrics.podMonitor.interval: 60s + metrics.podMonitor.labels: + release: prometheus + asserts: + - equal: + path: spec.podMetricsEndpoints[0].interval + value: 60s + - equal: + path: metadata.labels.release + value: prometheus diff --git a/charts/substrate-atelet/values.yaml b/charts/substrate-atelet/values.yaml index b68515745e..72e4054c91 100644 --- a/charts/substrate-atelet/values.yaml +++ b/charts/substrate-atelet/values.yaml @@ -69,6 +69,16 @@ atelet: cpu: "2" memory: 1Gi +# Prometheus Operator PodMonitor for atelet's metrics port. +metrics: + podMonitor: + # Requires the monitoring.coreos.com/v1 CRDs. + enabled: false + # Scrape interval. Empty leaves Prometheus' own default. + interval: "" + # Labels on the PodMonitor, such as the ones a podMonitorSelector matches. + labels: {} + # Object storage credentials/settings for the node object-store plugin. objectStorePlugin: extraEnv: [] diff --git a/charts/substrate/README.md b/charts/substrate/README.md index de1dd125fa..2920084edf 100644 --- a/charts/substrate/README.md +++ b/charts/substrate/README.md @@ -112,6 +112,9 @@ See `values.yaml` for the full set; the important keys: | `otel.metrics.endpoint` | `""` | OTLP endpoint for metrics, overriding `otel.endpoint` | | `otel.logs.enabled` | `true` | Enable OTLP actor events from ateapi and the ateworkers, plus the router access log. Actor events go to stdout when OTLP logs are disabled | | `otel.logs.endpoint` | `""` | OTLP endpoint for logs, overriding `otel.endpoint` | +| `metrics.podMonitor.enabled` | `false` | Render a Prometheus Operator `PodMonitor` for each workload that serves metrics. Requires the `monitoring.coreos.com/v1` CRDs | +| `metrics.podMonitor.interval` | `""` | Scrape interval. Empty leaves the Prometheus default | +| `metrics.podMonitor.labels` | `{}` | Labels on every `PodMonitor`, such as the ones a `podMonitorSelector` matches | ## Router timeouts diff --git a/charts/substrate/templates/podmonitor.yaml b/charts/substrate/templates/podmonitor.yaml index af2a7956cd..627b851c51 100644 --- a/charts/substrate/templates/podmonitor.yaml +++ b/charts/substrate/templates/podmonitor.yaml @@ -1,5 +1,5 @@ {{/* -Copyright 2026 Google LLC +Copyright 2026 The Agent Substrate Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -24,7 +24,7 @@ and no two agree on the port name: ate-controller serves controller-runtime's own metrics server. Its ctrl.Options sets no Metrics field, and only BindAddress "0" disables that - server, so it binds the default :8080 — the port its pod already declares as + server, so it binds the default :8080, which its pod already declares as `metrics`. This endpoint carries the controller_runtime_* and workqueue_* families that docs/metrics/substrate.yaml lists under bridged_metric_families. @@ -43,12 +43,14 @@ collected. A PodMonitor addresses a NAMED container port, so the name is per workload: one shared name would match some pods and silently miss the others. The pod label -is per workload too — each carries a bare `app: ` except the +is per workload too: each carries a bare `app: ` except the credential provider, whose label is the substrate.fullname helper's output and so depends on the release name. podcertificate-controller gets no monitor: it emits no metrics, which -docs/metrics/substrate.yaml states under blind_spots. +docs/metrics/substrate.yaml states under blind_spots. atelet and the credential +provider get one only when the chart renders them. With atelet.enabled=false, +the substrate-atelet chart renders atelet's monitor under the same name. One object per workload rather than one selecting several: an interval and a relabeling are a component's own, and the atelet is a DaemonSet whose series @@ -56,14 +58,15 @@ are per node. */}} {{- if .Values.metrics.podMonitor.enabled }} {{- $components := list - (dict "app" "ate-api-server" "ports" (list "prometheus")) - (dict "app" "ate-controller" "ports" (list "metrics")) - (dict "app" "atelet" "ports" (list "prometheus")) - (dict "app" "atenet-egress" "ports" (list "metrics" "stats")) - (dict "app" "atenet-router" "ports" (list "metrics" "gw-metrics")) - (dict "app" "k8s-credential-provider" "ports" (list "metrics") "fullnameLabel" true) + (dict "app" "ate-api-server" "ports" (list "prometheus") "enabled" true) + (dict "app" "ate-controller" "ports" (list "metrics") "enabled" true) + (dict "app" "atelet" "ports" (list "prometheus") "enabled" .Values.atelet.enabled) + (dict "app" "atenet-egress" "ports" (list "metrics" "stats") "enabled" true) + (dict "app" "atenet-router" "ports" (list "metrics" "gw-metrics") "enabled" true) + (dict "app" "k8s-credential-provider" "ports" (list "metrics") "fullnameLabel" true "enabled" .Values.credentialProvider.enabled) }} {{- range $components }} +{{- if .enabled }} {{- $label := .app }} {{- if .fullnameLabel }} {{- $label = include "substrate.fullname" (list .app $) }} @@ -96,3 +99,4 @@ spec: {{- end }} {{- end }} {{- end }} +{{- end }} diff --git a/charts/substrate/tests/podmonitor_test.yaml b/charts/substrate/tests/podmonitor_test.yaml index f166c124c8..4f60721ccf 100644 --- a/charts/substrate/tests/podmonitor_test.yaml +++ b/charts/substrate/tests/podmonitor_test.yaml @@ -1,4 +1,4 @@ -# Copyright 2026 Google LLC +# Copyright 2026 The Agent Substrate Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ # easy to get wrong and silent when wrong, so each is pinned per workload: # # the port NAME, because a PodMonitor addresses a named container port and no -# two sources agree — ate-api-server and atelet name theirs `prometheus`, the +# two sources agree: ate-api-server and atelet name theirs `prometheus`, the # others `metrics`, and the agentgateway sidecars of the router and the # egress add `gw-metrics` and `stats`; # @@ -41,6 +41,28 @@ tests: - hasDocuments: count: 6 +- it: leaves atelet's monitor to the substrate-atelet chart when atelet is off + set: + metrics.podMonitor.enabled: true + atelet.enabled: false + asserts: + - hasDocuments: + count: 5 + - notEqual: + path: spec.selector.matchLabels.app + value: atelet + +- it: renders no credential provider monitor when the provider is off + set: + metrics.podMonitor.enabled: true + credentialProvider.enabled: false + asserts: + - hasDocuments: + count: 5 + - notEqual: + path: spec.selector.matchLabels.app + value: k8s-credential-provider + - it: addresses the port name ate-api-server's pod declares set: metrics.podMonitor.enabled: true