Files
cozystack/hack/e2e-chainsaw/monitoring/monitoring-system.yaml
Aleksei Sviridkin 472f962eff test(e2e): cover monitoring OIDC modes with a Chainsaw suite
Monitoring OIDC lost its live-cluster coverage when the two pre-Chainsaw
BATS suites were removed without a port. Render tests pin each mode on a
fresh install, but not admission by cozystack-api, the Deployment the
Grafana operator builds from the CR, or what an in-place mode change leaves
behind on a running release.

The suite drives one tenant-test Monitoring release through System,
CustomConfig with an inline config, and CustomConfig with a secretRef,
so a single stack bring-up covers all three and the upgrades between
them: the cozy-realm client, scope and client Secret are pruned when
System mode is left, and the inline generic_oauth block is gone once the
secretRef mount arrives.

The monitoring package sources now map to this suite, so a change to
system/monitoring, extra/monitoring, monitoring-rd or grafana-operator
selects it alone instead of escalating to the full run, and the selector
test that relied on cozystack.monitoring reaching no suite seeds a
source that does not.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-10-02 15:03:00 +03:00

34 lines
1.0 KiB
YAML

# The extra/monitoring chart refuses any release name but `monitoring`
# (templates/check-release-name.yaml), so this is a singleton per tenant and
# every OIDC identifier the inner chart derives is built off the inner release
# `monitoring-system`. storageClassName "" takes the cluster default: the
# logs default is `replicated`, which the container lane does not have.
apiVersion: apps.cozystack.io/v1alpha1
kind: Monitoring
metadata:
name: monitoring
spec:
host: ""
metricsStorages:
- name: shortterm
retentionPeriod: "3d"
deduplicationInterval: "15s"
storage: 10Gi
storageClassName: ""
# Only the shortterm store exists here, so vmagent writes only there; its
# default list also names the longterm one.
vmagent:
remoteWrite:
urls:
- http://vminsert-shortterm:8480/insert/0/prometheus
logsStorages:
- name: generic
retentionPeriod: "1"
storage: 10Gi
storageClassName: ""
oidc:
mode: System
users:
- email: e2e-admin@example.com
role: Admin