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
Bug 1782726: Fixed PVC creation and GCP issues #3677
Bug 1782726: Fixed PVC creation and GCP issues #3677
Conversation
bipuladh
commented
Dec 5, 2019
- Added missing field for GCP target bucket
- Added missing help text for GCP upload
- Fixes payload for GCP and S3 Endpoint Type
Please add bugzilla id to this PR |
}; | ||
if (provider === 'PVC') { | ||
// eslint-disable-next-line | ||
bsPayload.spec['pvPool'] = { |
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.
why not bsPayload.spec.pvPool
? Then you don't need disable eslint for next line.
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.
it dont work like that. Have a look at spec object.
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.
ack
} | ||
if (provider === 'S3 Compatible') { | ||
// eslint-disable-next-line | ||
bsPayload.spec['s3Compatible'] = { |
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.
Same as above comment
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.
same as above
// eslint-disable-next-line | ||
bsPayload.spec['s3Compatible'] = { | ||
// eslint-disable-next-line | ||
...bsPayload.spec['s3Compatible'], |
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.
Same as above comment
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.
same as above
|
||
}; | ||
} | ||
if (provider === 'S3 Compatible') { |
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.
Move all these strings to constants and the use here. Same applies to rest of the code.
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.
ack
endpoint: providerDataState.endpoint, | ||
}; | ||
} | ||
// Add region in the end | ||
if (provider === 'AWS S3') { |
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.
Move it to constant
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.
ack
e442adf
to
7ce1e97
Compare
}; | ||
|
||
const typeNoobaaMap = { | ||
'AWS S3': 'aws-s3', | ||
'S3 Compatible': 's3-compatible', | ||
'Azure Blob': 'azure-blob', | ||
'Google cloud storage': 'google-cloud-storage', |
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.
freeze this object and name in caps
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.
You have enum BC_PROVIDERS
.
The key values can be constructed from that to track changes at one place only.
@@ -58,12 +59,14 @@ const bucketNoobaaMap = { | |||
'AWS S3': 'targetBucket', | |||
'S3 Compatible': 'targetBucket', | |||
'Azure Blob': 'targetBlobContainer', | |||
'Google cloud storage': 'targetBucket', |
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.
You have enum BC_PROVIDERS
.
The key values can be constructed from that to track changes at one place only.
AWS = 'AWS S3', | ||
S3 = 'S3 Compatible', | ||
PVC = 'PVC', | ||
GOOG = 'Google cloud storage', |
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.
A curiosity question, why GOOG and not GCS or GCP?
(Though I saw GCP is used explicitly at various places in code)
7ce1e97
to
243ed50
Compare
/retest |
243ed50
to
9c9113b
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: afreen23, bipuladh The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest Please review the full test history for this PR and help us cut down flakes. |
7 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest |
/retest Please review the full test history for this PR and help us cut down flakes. |
3 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest |
/retest Please review the full test history for this PR and help us cut down flakes. |
12 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest |
/retest Please review the full test history for this PR and help us cut down flakes. |
1 similar comment
/retest Please review the full test history for this PR and help us cut down flakes. |
@bipuladh: All pull requests linked via external trackers have merged. Bugzilla bug 1782726 has been moved to the MODIFIED state. In response to this:
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. |
/cherrypick release-4.3 |
@bipuladh: #3677 failed to apply on top of branch "release-4.3":
In response to this:
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. |