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

Implement S3 bucket source #146

Merged
merged 6 commits into from
Sep 18, 2020
Merged

Implement S3 bucket source #146

merged 6 commits into from
Sep 18, 2020

Conversation

stefanprodan
Copy link
Member

@stefanprodan stefanprodan commented Sep 18, 2020

Changes:

  • add Bucket type to API
  • add Bucket CRD and RBAC
  • implement BucketReconciler using minio go client
  • implement auth using static keys for S3 compatible storage (aws, minio, gcp, alibaba, etc)
  • implement AWS IAM auth when running on EKS
  • add e2e tests with Minio on Kubernetes Kind

Fix: #145
Proposal: fluxcd/flux2#242

@stefanprodan stefanprodan added the enhancement New feature or request label Sep 18, 2020
}

// download bucket content
for object := range s3Client.ListObjects(ctxTimeout, bucket.Spec.BucketName, minio.ListObjectsOptions{Recursive: true}) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the ignores should already be taken into account here, as otherwise the revision will differ on any added file and/or change, while we want to ignore those.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed this a bit further: in a future iteration we would like to switch to an approach where the .sourceignore file is looked up first in the bucket, and combined with the .spec.ignore if it exists.

We can then use the merged ignore patterns to efficiently download the files we want to include whilst calculating the revision checksum at the same time, as done in https://github.com/fluxcd/source-controller/blob/v0.0.16/controllers/storage.go#L178-L211

@stefanprodan stefanprodan force-pushed the s3-bucket-controller branch 3 times, most recently from d5c9794 to 6f8c381 Compare September 18, 2020 13:10
@stefanprodan stefanprodan merged commit ce07344 into master Sep 18, 2020
@stefanprodan stefanprodan deleted the s3-bucket-controller branch September 18, 2020 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support S3 buckets
2 participants