Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

feat(images): gcr pubsub push notification for image updates #18

Closed
dmccaffery opened this issue Jan 14, 2020 · 2 comments · Fixed by #20
Closed

feat(images): gcr pubsub push notification for image updates #18

dmccaffery opened this issue Jan 14, 2020 · 2 comments · Fixed by #20
Labels
enhancement New feature or request

Comments

@dmccaffery
Copy link

Would like to add support for handling GCR pubsub notifications for image repository updates based on:

https://cloud.google.com/container-registry/docs/configuring-notifications

and:

https://cloud.google.com/pubsub/docs/push

GCR has some pretty tight limits around API requests and some setups where a single GCR registry used by many clusters is hitting the limits pretty hard. Using this webhook receiver, GCR users could disable long polling entirely using --exclude-images and rely on the webhook receiver to update the image cache.

The implementation should support the following payloads:

  • add image (new)
  • add tag

It should also support authentication token validation from google if configured to do so.

I'm happy to implement this, but wanted to reach out to the community for thoughts before doing so.

@squaremo
Copy link
Member

disable long polling entirely using --exclude-images and rely on the webhook receiver

It was unclear to me whether an image would be scanned if it's excluded with --exclude-images, but mentioned in a webhook. The answer is "Yes, kind of": the registry cache will happily respond to a webhook by scanning the mentioned image repo, whether it's excluded or not. However, the cluster will not bother to record credentials for a given image if it's excluded -- so it's possible that the scan will fail authentication.

It's not immediately obvious to me what the solution is :-/

@sjk07
Copy link

sjk07 commented Jan 22, 2020

I have started executing on this, should have something together by tomorrow 🤞

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants