Repository navigation
feat(sources): add allow-listed journald and Kubernetes container log sources with DaemonSet (#92) - #313
Merged
Conversation
… sources with DaemonSet (#92)
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 46 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
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.
Summary
Closes #92.
Adds bounded, allow-listed, cursor-durable systemd journald and Kubernetes container log sources with a hardened namespaced DaemonSet example:
src/Bower.Source.Journald):Units) and/orSYSLOG_IDENTIFIER(Identifiers) allow-lists (refusing empty lists and wildcards) at both validation and runtime.IJournalReaderseam plus Native AOT-safeLibSystemdJournalReader(LibraryImportagainstlibsystemd.so.0on Linux, zero external NuGet dependencies).packs/linux-journald-sshand commits durable cursors inISourceCursorStorestrictly after caller acknowledgement (at-least-once semantics; handles backpressure and oversized/malformed entries safely).src/Bower.Source.Kubernetes):Namespaces(DNS-1123, max 32) andLabelSelectors(key=value, max 16) — no cluster-wide default collection and no pod annotation auto-discovery.KubernetesApiPodCatalog(namespacedGET /api/v1/namespaces/{ns}/pods, ServiceAccount bearer token read from file, 4 MiB response cap, Native AOT source-generated JSON, zero third-party packages).Bower.Source.File.FileTailReaderfor symlink-safe, bounded, rotation-aware/var/log/podstailing and durableFileTailCursorcheckpoints.<timestamp> <stdout|stderr> <P|F> <message>), joins partial (P) fragments up toMaxPartialBytes, drops unrecognised non-envelope stdout noise, attaches minimal pod metadata (k8s.namespace,k8s.pod,k8s.container,k8s.stream) plus explicitly allow-listed pod labels only, and assigns deterministicEventIds for replay deduplication.deploy/kubernetes/daemonset.yaml(namespacedRole/RoleBindingget/listpodsonly — neverClusterRole, read-only/var/log/podsmount,runAsNonRoot,readOnlyRootFilesystem,capabilities.drop: ["ALL"],seccompProfile: RuntimeDefault).docs/deployment/journald-source.md,docs/deployment/kubernetes-source.md, updateswebsite/sidebars.ts, and documents both trust boundaries indocs/security/threat-model.md.AGENTS.mdin both new source projects.Verification
dotnet build --configuration Release— 0 warnings, 0 errorsdotnet test(JournaldAndKubernetesSourceTests) — 5 passed, 0 failed (unit/identifier allow-list, SQLite cursor persistence + backpressure + restart recovery +packs/linux-journald-sshintegration, K8s namespace/label allow-list, CRI partial join, rename log rotation + restart recovery, K8s API namespaced bearer-token client)dotnet format --verify-no-changes— passedpython3 -m unittest tools/docs/tests/test_build_tools.py— 7/7 passedSecurity and compatibility impact