Skip to content

PrPlanIT/PolySieve

Repository files navigation

PolySieve

Derive Kubernetes network authorization policy from a GitOps repository's own manifests — the source of truth — rather than from a live cluster.

badge/GitHub-source-181717?logo=github badge/GitLab-source-FC6D26?logo=gitlab Last Commit Open Issues Contributors

build license release updated badge/donate-FF5E5B?logo=ko-fi&logoColor=white badge/sponsor-EA4AAA?logo=githubsponsors&logoColor=white

badge/Docker-prplanit%2Fpolysieve-2496ED?logo=docker&logoColor=white pulls

Given a repo of Gateway API HTTPRoutes and Services, PolySieve resolves the least-privilege ingress each namespace actually needs and emits the corresponding policy objects (Cilium CiliumClusterwideNetworkPolicy, Istio AuthorizationPolicy, …) in the shape a given cluster expects, selected by a profile.

A sieve is a filter that decides what passes; a network policy is a sieve over traffic (the allow-list is what gets through). "Poly" ⇒ policy and poly-backend.

Why repo-driven

Deriving policy from the live cluster inverts GitOps layering — the committed policy becomes a function of the running cluster. That is non-deterministic, needs cluster access, and can't generate policy for an app that isn't deployed yet (a deploy-then-catch-up gap). Reading the repo instead is deterministic, reproducible, CI-runnable with no cluster, and lets a new app and its policy land in one commit, no gap.

Usage

polysieve generate --repo <gitops-repo> --profile dungeon   # write derived policy files
polysieve check    --repo <gitops-repo> --profile dungeon   # diff vs committed (nonzero on drift)

--root overrides the profile's kustomize build directories; --kustomize sets the binary.

Architecture

repo → Discovery (generic route-graph) → Render (profile) → policy files

Discovery renders the repo and walks the Gateway API graph (HTTPRoute.backendRefs → Service → targetPort) into a typed RouteGraph. A profile maps that graph to a cluster's concrete policy. See docs/DESIGN.md.

License

AGPL-3.0-only.

About

No description, website, or topics provided.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors