sigstore / policy-controller

Sigstore Policy Controller - an admission controller that can be used to enforce policy on a Kubernetes cluster based on verifiable supply-chain metadata from cosign

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implement a simple in-mem cache (with opt-in).

vaikas opened this issue · comments

A caching interface was implemented and by default it's implemented by just a placeholder. We should implement a simple in-memory cache to reduce hits on registry.

Interface:
https://github.com/sigstore/policy-controller/blob/main/pkg/webhook/cache.go#L47

And then it should be injected into the context somewhere around here based on flags:
https://github.com/sigstore/policy-controller/blob/main/cmd/webhook/main.go#L76

@vaikas Should we include this issue into the v1 milestone ?