-
Notifications
You must be signed in to change notification settings - Fork 100
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
Enhancing etcd-backup-restore
to support Azurite
- the Azure Blob Storage emulator
#699
Conversation
/retest |
@seshachalam-yv @anveshreddy18 |
Yeah we can move it to |
…re Blob Storage Emulator while conforming to common design for Azurite and GCS emulator * Added the `AZURE_ENABLE_STORAGE_EMULATOR` environment variable to indicate that the Azurite emulator is being used. It takes a boolean value. * The `AZURE_STORAGE_API_ENDPOINT` environment variable stores the endpoint exposed by the Azurite emulator. * Added the optional fields `enableAzurite` and `storageAPIEndpoint` to the example file example/storage-provider-secrets/00-azure-blob-storage-secret.yaml * Added the optional fields `enableAzurite` and `storageAPIEndpoint` to the template file chart/etcd-backup-restore/templates/etcd-statefulset.yaml * Added the optional fields `enableAzurite` and `storageAPIEndpoint` to the file chart/etcd-backup-restore/values.yaml * Added the optional fields `enableAzurite` and `storageAPIEndpoint` to the template file chart/etcd-backup-restore/templates/etcd-backup-secret.yaml
* Changed the environment variable that is used to signify that the Azurite emulator is being used from `AZURE_ENABLE_STORAGE_EMULATOR` to `EMULATOR_ENABLED`. The corresponding changes are also to be made in gardener#697. * The field which signifies the emulator is being used for Azure in the secret is changed from `enableAzurite` to `emulatorEnabled`, mirroring the enivornment variable name change. * A new function `constuctBlobServiceURL()` is introduced, which makes the handling of the detection of the Azurite emulator logic cleaner.
* `constructBlobServiceURL` visibility changed to `ConstructBlobServiceURL`. * Unit tests added for `ConstructBlobServiceURL`. * Redundant arguments in `ConstructBlobServiceURL` removed.
* The function `ConstructBlobServiceURL()` is restructured to not be nested. * Previously defined constants in `pkg/snapstore/snapstore.go` used in `snapstore_test.go` instead of repeating the constants.
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.
Thank you, @renormalize, for incorporating the tests and addressing the feedback provided in my review comments.
/lgtm
etcd-backup-restore
to make use of Azurite
- the Azure Blob Storage emulatoretcd-backup-restore
to support Azurite
- the Azure Blob Storage emulator
etcd-backup-restore
to support Azurite
- the Azure Blob Storage emulatoretcd-backup-restore
to support Azurite
- the Azure Blob Storage emulator
/assign |
What this PR does / why we need it:
Changes to make
etcd-backup-restore
work withAzurite
- the Azure Blob Storage emulator to enable easier local development and testing.Two new environment variables are introduced to make use of
Azurite
withetcd-backup-restore
:EMULATOR_ENABLED
- indicates whetherAzurite
is being used instead of ABS infrastructure. Takes boolean values, and hence can be set totrue
orfalse
.AZURE_STORAGE_API_ENDPOINT
- stores the endpoint at whichAzurite
is hosted. For example, ifAzurite
is hosted athttp://localhost:10000
,AZURE_STORAGE_API_ENDPOINT
is set to this address.etcd-backup-restore
reacts to the presence of this environment variable and sets the endpoint forAzurite
accordingly if and only if theEMULATOR_ENABLED
is set totrue
. This environment variable currently can not be used to set a custom endpoint for ABS, and can only be made use of to useAzurite
.Which issue(s) this PR fixes:
Fixes #698
Special notes for your reviewer:
Release note: