adaptive_export 0.16.4-rc1: kssync replaces the ks-ch-sync CronJob - #105
Merged
ConstanzeTU merged 10 commits intoSep 11, 2026
Merged
Conversation
ConstanzeTU
merged commit Sep 11, 2026
ba22a8b
into
fix/ae-protocol-export-pxexport
4 of 6 checks passed
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.
Rolls adaptive-export to 0.16.4-rc1, which mirrors kubescape state into ClickHouse from AE instead of soc's
ks-ch-syncCronJob.Why
ks-ch-syncis apython:3.11-slimpod that every 2 minutes LISTs every ContainerProfile, GETs each one individually, and INSERTs all of them unconditionally. Measured on edge4: 234 profiles against 624,447 stored rows — about 2,669 copies of each profile, holding 271 distinct contents. Every row carries the container's whole learned behaviour as text, which is whykubescape_profilesreached 501 MB, and why one dashboard panel reading it exhausted the ClickHouse server's memory budget and killed the container (exit 137).The amplification was never the language. It was a timer with no change detection.
What changes
resourceVersionhas moved — removing ~235 API calls per run as well.specon a LIST (execs/opens/egress come back empty), so an informer's cache would hold truncated objects and mirror empty profiles. LIST for metadata, GET for content.hostname, which the PEM requires (WHERE hostname = gethostname()), and logs it.Contents
k8s/vizier/adaptive_export/kustomization.yaml:newTag0.16.3-rc1 → 0.16.4-rc1k8s/vizier/bootstrap/adaptive_export_role.yaml: read-only grants kssync needs —containerprofilesandrogueartifacts(get/list, cluster-scoped because the CRDs are), andconfigmapsrestricted byresourceNamestonode-agent-bundle-policyrather than a blanket grant.Deploy order matters
ADAPTIVE_KSSYNC_DISABLE=trueor remove theks-ch-syncCronJob before or with this roll. Both writing at once doubles every changed row.Verifying
The log line reports
listed,fetchedandwrittenseparately. On a steady cluster the correct reading is non-zero listed, zero written — that is the fix working, and it is indistinguishable from a broken sync unless both numbers are read.Not in this PR
No table engine change.
event_timeleading the sorting key is what makes every re-write a distinct row; collapsing it would destroy the profile history, which is currently the only record of how a profile evolved. Separate decision, separate image.🤖 Generated with Claude Code
https://claude.ai/code/session_014GDT6HWiFmRxmUaGFSKjPY