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

aws cloudstorage bucket refactor #561

Merged
merged 7 commits into from
Feb 15, 2022

Conversation

kaovilai
Copy link
Member

@kaovilai kaovilai commented Feb 1, 2022

refactoring for adding other clouds.

bits from https://github.com/kaovilai/oadp-operator/tree/cloudstorage_azure refactoring without all the unfinished implementations of azure.

There's a follow-up branch for implementing GCP WIP https://github.com/kaovilai/oadp-operator/tree/cloudstorage_gcp

@codecov-commenter
Copy link

codecov-commenter commented Feb 1, 2022

Codecov Report

Merging #561 (31027fc) into master (19b5dc3) will decrease coverage by 0.20%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #561      +/-   ##
==========================================
- Coverage   38.43%   38.23%   -0.21%     
==========================================
  Files          13       14       +1     
  Lines        2849     2864      +15     
==========================================
  Hits         1095     1095              
- Misses       1673     1688      +15     
  Partials       81       81              
Impacted Files Coverage Δ
controllers/bsl.go 46.29% <0.00%> (-2.54%) ⬇️
pkg/bucket/aws.go 0.00% <0.00%> (ø)
pkg/bucket/client.go 19.51% <0.00%> (+14.63%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 19b5dc3...31027fc. Read the comment docs.

@kaovilai kaovilai force-pushed the cloudstorage_azure-aws_refactor branch from 89b7e3d to 0fe0437 Compare February 1, 2022 06:04
@weshayutin
Copy link
Contributor

+1

pkg/bucket/client.go Outdated Show resolved Hide resolved
pkg/bucket/client.go Show resolved Hide resolved
pkg/bucket/client.go Outdated Show resolved Hide resolved
@kaovilai kaovilai marked this pull request as draft February 1, 2022 22:05
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 1, 2022
@weshayutin
Copy link
Contributor

I need a recent test result for ci-search. going to kick one job :)
/test 4.8-operator-e2e

@kaovilai kaovilai force-pushed the cloudstorage_azure-aws_refactor branch from d1125ff to 31027fc Compare February 8, 2022 20:51
}

func (a awsBucketClient) getCredentialFromSecret() (string, error) {
func getCredentialFromCloudStorageSecret(a client.Client, cloudStorage v1alpha1.CloudStorage) (string, error) {
Copy link
Member Author

@kaovilai kaovilai Feb 8, 2022

Choose a reason for hiding this comment

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

The function is now parameterized so other bucketClient types can access this function by passing its client.Client and CloudStorage

@kaovilai kaovilai marked this pull request as ready for review February 8, 2022 20:59
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 8, 2022
Copy link
Member

@dymurray dymurray left a comment

Choose a reason for hiding this comment

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

This looks good to me, please look at my comment about panicking... if you agree I say just make that change and we'll be good to ack/merge

api/v1alpha1/cloud_storage_types.go Outdated Show resolved Hide resolved
config/crd/bases/oadp.openshift.io_cloudstorages.yaml Outdated Show resolved Hide resolved
controllers/bsl.go Outdated Show resolved Hide resolved
controllers/bsl.go Outdated Show resolved Hide resolved
)

type CloudStorageSpec struct {
// Name is the name requested for the bucket
// Name is the name requested for the bucket (aws, gcp) or container (azure)
Copy link
Contributor

Choose a reason for hiding this comment

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

why is azure container?

Copy link
Member Author

@kaovilai kaovilai Feb 10, 2022

Choose a reason for hiding this comment

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

They call it container instead of bucket https://docs.microsoft.com/en-us/cli/azure/storage/container

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for the knowledge!

@openshift-ci
Copy link

openshift-ci bot commented Feb 10, 2022

@kaovilai: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@dymurray dymurray merged commit 5a5cf32 into openshift:master Feb 15, 2022
kaovilai added a commit to kaovilai/oadp-operator that referenced this pull request Feb 17, 2022
* aws cloudstorage bucket refactor

* remove unused configmap

* azure wip

wip

reset skeleton

update

wip

wip

* remove added internal methods from interface, passes more parameters

* indent

* remove wip azure.go

* address openshift#561 (review)
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.

None yet

5 participants