Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add caching and attestation verification #21

Merged
merged 4 commits into from
Aug 7, 2023
Merged

Conversation

vishal-chdhry
Copy link
Contributor

@vishal-chdhry vishal-chdhry commented Aug 6, 2023

Closes #3

test image: ghcr.io/vishal-chdhry/kyverno-notation-aws:test

NOTES:

  1. PR is not this large, most of the changes are in go.sum and go.mod
  2. This PR increased the size of binary (built using docker) from 59 MB to 77 MB
  3. Condition key should not be enclosed in {{}} as kyverno will try to replace them. I am adding {{}} to the key in the request once it is recieved, conditions should be like this: key: creationInfo.licenseListVersion
  4. The cache is cleared after every trust store and trust policy CRD change
  5. Conditions are also cached so that 2 different conditions don't count as one.

this commit will check the cache first before making any network call, even fetching the desc

Signed-off-by: Vishal Choudhary <[email protected]>
Signed-off-by: Vishal Choudhary <[email protected]>
Signed-off-by: Vishal Choudhary <[email protected]>
@realshuting realshuting merged commit 6c950b7 into main Aug 7, 2023
3 checks passed
@realshuting realshuting deleted the attestations branch August 9, 2023 05:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a TTL cache for verified images
2 participants