Files
cozystack/hack/e2e-chainsaw/monitoring/monitoring-customconfig-inline.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
787 B
YAML

apiVersion: apps.cozystack.io/v1alpha1
kind: Monitoring
metadata:
name: monitoring
spec:
host: ""
metricsStorages:
- name: shortterm
retentionPeriod: "3d"
deduplicationInterval: "15s"
storage: 10Gi
storageClassName: ""
vmagent:
remoteWrite:
urls:
- http://vminsert-shortterm:8480/insert/0/prometheus
logsStorages:
- name: generic
retentionPeriod: "1"
storage: 10Gi
storageClassName: ""
oidc:
mode: CustomConfig
customConfig:
config:
client_id: byo-monitoring
client_secret: byo-secret
auth_url: https://idp.example.test/auth
token_url: https://idp.example.test/token
api_url: https://idp.example.test/userinfo
users:
- email: e2e-byo@example.com
role: Viewer