Sync alert rules from the alerts charts, add sync tooling - #1140
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bumps
go.appscode.dev/alertsto791e5af59674and 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-editorandkubedbcom-solr-editor-options:solrHighBufferSize3000000→2530s→5msolrHighHeapSize3000000→8530s→5msolrHighPoolSize3000000→8530s→5mBoth solr
alert.yamltemplates are regenerated to match.milvus / zookeeper — not threshold changes.
8e+08and1e+06are the same numbers as800000000and1000000; 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.yamlis unaffected — it's generated from the vendored Go types, not fromvalues.yaml.Tooling
Adds
.claude/commands/sync-alerts.sh, which performs the sync deterministically instead of by hand:metadata.labelsblock, and thealertEnabledargument shape, which differs between the two chart families-editorand-editor-optionschartsvalues.yaml, andform.alertagainst the source chartALERTS_DIRoverrides 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.
--allnow reports in sync for all 28 charts that have an upstream alerts chart.db2anddocumentdbhave none and are reported as skipped rather than silently dropped.Follow-up needed
The generated
README.mdfiles for the four charts whosevalues.yamlchanged are stale — they embed the values defaults, so the solr READMEs still showval: 3000000andduration: "30s". Regenerating needsmake 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 fmtis blocked on the same.