-
Notifications
You must be signed in to change notification settings - Fork 28
Support using pre-allocated blob containers in azure. #660
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
Conversation
@tasdomas, would you mind setting the base branch of #660 (this) to #651 so I don't have to tweak GitHub filters too much to review only the changes it introduces? |
I was thinking that we'd land #651 first and then move on to this. |
f149c7b
to
aa5d79c
Compare
…re data source. Use common.RemoteStorage to initialize the data sources. Using rclone to verify storage during Read. Remove aws s3 client mocks and tests that rely on them.
bfdf872
to
e93e8fb
Compare
) | ||
|
||
// NewExistingS3Bucket returns a new data source refering to a pre-allocated | ||
// S3 bucket. | ||
func NewExistingS3Bucket(client S3Client, credentials aws.Credentials, id string, region string, path string) *ExistingS3Bucket { | ||
func NewExistingS3Bucket(credentials aws.Credentials, storageParams common.RemoteStorage) *ExistingS3Bucket { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Passing common.RemoteStorage
to create a reference to an existing s3 bucket, instead of individual params.
return common.NotFoundError | ||
} | ||
return err | ||
err := machine.CheckStorage(ctx, b.connection()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using rclone to verify bucket access (this will be done across all providers, sans k8s
)
@@ -1,5 +0,0 @@ | |||
package mocks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By moving to using rclone
to validate bucket access, these mocks are no longer useful. I'll probably revisit the idea at some point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still believe that it would be better to treat and expose rclone
connection strings as such to users instead of building them internally, but that's the kind of review comment that makes more sense on the whole feature branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we can merge it, before it breathes too much and leave some reviews on the overall approach for the feature branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I had some az credential issues but that is unrelated 🙃
* Support for existing storage containers in aws and gcp. (#651) * Update config schema. * AWS support for existing S3 buckets. * Existing bucket support for gcp. * Add mocks and tests to existing bucket resource in aws. * Update docs with new pre-allocated container fields. * Support using pre-allocated blob containers in azure. (#660) * AWS support for existing S3 buckets. * Existing bucket support for gcp. * Fix subdirectory in rclone remote. * Blob container generates the rclone connection string. * Introduce a type for generating rclone connection strings. * Azure support for reusable blob containers. * Update docs. * Fix path prefix. * Initialize s3 existing bucket with RemoteStorage struct. * Update gcp and aws existing bucket data sources to align with the azure data source. Use common.RemoteStorage to initialize the data sources. Using rclone to verify storage during Read. Remove aws s3 client mocks and tests that rely on them. * Fix comment. * K8s support for specifying an existing persistent volume claim (#661) * K8s support for specifying an existing persistent volume claim. Co-authored-by: Helio Machado <[email protected]> * Update use of Identifier struct. * Combine container and container_path config keys. * Update docs. * Use split function from rclone. Co-authored-by: Helio Machado <[email protected]>
This PR contains a few other changes as well: