Why bucket contents are not cached in bucket-controller? #5131
-
I have configured I have gone through bucket_controller.go and figured that we are already building an index of bucket content along with their etags. We are checking if the computed digest matches the digest stored on Bucket CR's status. If not, we iterate over the index and download object content for each file. Are there any known challenges for caching bucket contents? Can we integrate cache package in bucket controller such that we download on the files whose etag is different from the one recorded in the cache? I am more than happy to contribute towards this enhancement. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 10 replies
-
Have you considered using the source OCIRepository instead of Bucket? It is much safer and recommended, you can sign OCI artifacts using cosign and have Flux verify the signature in-cluster right before consuming the artifact. I'd personally try to avoid buckets as much as possible. |
Beta Was this translation helpful? Give feedback.
-
Our use case is slightly different. We have an API layer dumping yaml in an
S3 bucket. We are utilising flux to deploy these yamls to various clusters
at runtime.
…On Mon, 6 Jan 2025, 18:23 Matheus Pimenta, ***@***.***> wrote:
Have you considered using the source OCIRepository instead of Bucket? It
is much safer and recommended, you can sign OCI artifacts using cosign and
have Flux verify the signature in-cluster right before consuming the
artifact. I'd personally try to avoid buckets as much as possible,
—
Reply to this email directly, view it on GitHub
<#5131 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABQALPQN7VQIPKWSDEKK4232JJ4CZAVCNFSM6AAAAABUVPWSFSVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCNZUHA2DMNA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
All Flux sources work the same, if the computed digest changes (for Git this the head sha, for OCI this is the artifact digest) we fetch the whole content. Tracking each file and their checksum is not something we want to do, would mean storing a huge amount of information in the status thus in etcd which is limited to 1Mbi. |
Beta Was this translation helpful? Give feedback.
@kgoutham93 If multi-tenancy is a factor here, then having a dedicated OCIRepository per tenant makes way more sense than storing all things in a single bucket IMO. You could use the same registry and have some convention for tags, encoding the tenant name/id would suffice. Instead of an S3 PUT you would run
flux push artifact registry/manifests:tenant1
.