Skip to content

Sync alert rules from the alerts charts, add sync tooling - #1140

Merged
ArnobKumarSaha merged 2 commits into
masterfrom
arnob-sync-alerts
Aug 13, 2026
Merged

Sync alert rules from the alerts charts, add sync tooling#1140
ArnobKumarSaha merged 2 commits into
masterfrom
arnob-sync-alerts

Conversation

@ArnobKumarSaha

Copy link
Copy Markdown
Member

Bumps go.appscode.dev/alerts to 791e5af59674 and syncs the resulting alert rule changes into the kubedb editor charts.

Chart changes

solr — real threshold changes from the upstream Solr alert fix (#138), applied to both kubedbcom-solr-editor and kubedbcom-solr-editor-options:

rule val duration
solrHighBufferSize 300000025 30s5m
solrHighHeapSize 300000085 30s5m
solrHighPoolSize 300000085 30s5m

Both solr alert.yaml templates are regenerated to match.

milvus / zookeeper — not threshold changes. 8e+08 and 1e+06 are the same numbers as 800000000 and 1000000; they're normalized to the form the source charts use so the sync check stays clean.

No rule keys were added or removed anywhere, so values.openapiv3_schema.yaml is unaffected — it's generated from the vendored Go types, not from values.yaml.

Tooling

Adds .claude/commands/sync-alerts.sh, which performs the sync deterministically instead of by hand:

  • applies the three template transforms — helper prefix, metadata.labels block, and the alertEnabled argument shape, which differs between the two chart families
  • writes both the -editor and -editor-options charts
  • checks template rule keys against values.yaml, and form.alert against the source chart
  • verifies by rendering both charts and diffing them against each other
sync-alerts.sh                # list syncable dbs, change nothing
sync-alerts.sh <db> [db...]   # sync those
sync-alerts.sh --all          # sync all matched
sync-alerts.sh --check [...]  # report only, write nothing

ALERTS_DIR overrides the alerts repo location (default ~/go/src/go.opnpulse.dev/alerts).

Confidence in the transform: run over all 28 charts, it reproduced the existing destination byte-for-byte everywhere except solr, across two different upstream template formatting styles.

--all now reports in sync for all 28 charts that have an upstream alerts chart. db2 and documentdb have none and are reported as skipped rather than silently dropped.

Follow-up needed

The generated README.md files for the four charts whose values.yaml changed are stale — they embed the values defaults, so the solr READMEs still show val: 3000000 and duration: "30s". Regenerating needs make gen-chart-doc-kubedbcom-{solr-editor,solr-editor-options,milvus-editor,zookeeper-editor}, which requires docker and could not be run in this environment. make fmt is blocked on the same.

Bump go.appscode.dev/alerts to 791e5af59674 and sync the resulting alert
rule changes into the kubedbcom editor charts.

Solr picked up real threshold changes from the upstream Solr alert fix:
solrHighBufferSize val 3000000 -> 25, solrHighHeapSize and solrHighPoolSize
val 3000000 -> 85, and all three duration 30s -> 5m. Both solr alert.yaml
templates are regenerated to match.

The milvus and zookeeper values changes are not threshold changes: 8e+08
and 1e+06 are the same numbers as 800000000 and 1000000, normalized to the
form the source charts use so the sync check stays clean.

Add .claude/commands/sync-alerts.sh, which does the sync deterministically:
it applies the three template transforms (helper prefix, metadata.labels
block, alertEnabled argument shape), writes both the -editor and
-editor-options charts, checks rule keys against values.yaml, and verifies
by rendering both charts and diffing them against each other. Run with
--check to report without writing. It reports in-sync across all 28 charts
that have an upstream alerts chart; db2 and documentdb have none.

The generated README.md files for the four charts whose values changed are
still stale: regenerating them needs make gen-chart-doc-*, which requires
docker.

Signed-off-by: Arnob Kumar Saha <arnob@appscode.com>
Signed-off-by: Arnob Kumar Saha <arnob@appscode.com>
@ArnobKumarSaha
ArnobKumarSaha merged commit 2111cb9 into master Aug 13, 2026
3 of 4 checks passed
@ArnobKumarSaha
ArnobKumarSaha deleted the arnob-sync-alerts branch August 13, 2026 06:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant