Introduce the --store-endpoint-override flag to pass storage endpoint configuration, instead of using the credential secret#952
Conversation
15f0f44 to
0cda4cd
Compare
0cda4cd to
a37a790
Compare
This comment was marked as outdated.
This comment was marked as outdated.
* `store-endpoint`'s value will be used to override the provider's default. Signed-off-by: Saketh Kalaga <saketh.kalaga@sap.com>
* Endpoint override specified as a flag takes precedence over the override specified in the credential file. * Remove "chunk" suffixes that were added when the emulator was used. Signed-off-by: Saketh Kalaga <saketh.kalaga@sap.com>
* Remove emulator support in the code, since the storage-endpoint override must be used for an emulator as the backend. * Endpoint override specified as a flag takes precedence over the override specified in the credential file. * Remove unit tests for functions which used to construct the `BlobServiceURL`. Signed-off-by: Saketh Kalaga <saketh.kalaga@sap.com>
* Endpoint override specified as a flag takes precedence over the override specified in the credential file. Signed-off-by: Saketh Kalaga <saketh.kalaga@sap.com>
* This flag is now removed since etcd-backup-restore must not be aware of the fact that it is running with an emulated storage backend. Signed-off-by: Saketh Kalaga <saketh.kalaga@sap.com>
* `SnapstoreConfig.Endpoint` is renamed to `SnapstoreConfig.EndpointOverride` to better indicate to consumers that this field is an override, and not mandatory. * Rename the `store-endpoint` flag to `store-endpoint-override`. * Introduce a new function `configureClientOptions` for the GCS provider. This function checks the scheme of the endpoint of the GCS bucket, and if `http` is specified, it configures the client to work with an emulator. This is because `http` communication with GCS APIs is not allowed. Signed-off-by: Saketh Kalaga <saketh.kalaga@sap.com>
Signed-off-by: Saketh Kalaga <saketh.kalaga@sap.com>
shreyas-s-rao
left a comment
There was a problem hiding this comment.
@renormalize thanks for addressing my comments.
/lgtm
|
LGTM label has been added. DetailsGit tree hash: a0ac70818cb8a68301aa69ced99b3a993c940df1 |
…he bucket name to the override to form the URL instead. Signed-off-by: Saketh Kalaga <saketh.kalaga@sap.com>
Signed-off-by: Saketh Kalaga <saketh.kalaga@sap.com>
Signed-off-by: Saketh Kalaga <saketh.kalaga@sap.com>
Signed-off-by: Saketh Kalaga <saketh.kalaga@sap.com>
CaptainIRS
left a comment
There was a problem hiding this comment.
@renormalize thanks for addressing the review comments. I just have 1 follow-up comment, other than that, LGTM! PTAL, thanks.
|
LGTM label has been added. DetailsGit tree hash: 4234f6e1ddd8b48a9efe8115f45a8cd8f6be787c |
CaptainIRS
left a comment
There was a problem hiding this comment.
@renormalize thanks for making the logic in etcd-backup-restore agnostic to whether it is being run with emulators or not (like it ideally should be). LGTM!
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: CaptainIRS, ishan16696, shreyas-s-rao The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
The Gardener project currently lacks enough active contributors to adequately respond to all PRs.
You can:
/lifecycle stale |
How to categorize this PR?
/area backup compliance robustness
/kind enhancement
What this PR does / why we need it:
This PR introduces changes to pass storage endpoint configuration through CLI flags, instead of information passed in the credential secret.
Passing endpoint information through credential files is deprecated, and this handling will be completely removed in v0.42.0.
This PR also removes all code in etcd-backup-restore that makes it aware that the storage backend is an emulator and not real infrastructure. etcd-backup-restore must not be aware of this information ideally.
Which issue(s) this PR fixes:
Fixes #943
Special notes for your reviewer:
Release note: