use of io.stackgres.common.crd.storages.AzureBlobSecretKeySelector in project stackgres by ongres.
the class BackupConfigSourceValidatorTest method setAzureBlobCredentials.
private void setAzureBlobCredentials(final BackupConfigReview review, String accountName, String accountKey, String accessKeyName, String accessKeyKey) {
BackupStorage storage = review.getRequest().getObject().getSpec().getStorage();
storage.setType("azureblob");
storage.setAzureBlob(new AzureBlobStorage());
storage.getAzureBlob().setAzureCredentials(new AzureBlobStorageCredentials());
storage.getAzureBlob().getAzureCredentials().setSecretKeySelectors(new AzureBlobSecretKeySelector());
AzureBlobSecretKeySelector azureBlobSecretKeySelector = storage.getAzureBlob().getAzureCredentials().getSecretKeySelectors();
azureBlobSecretKeySelector.setAccount(new SecretKeySelector(accountKey, accountName));
azureBlobSecretKeySelector.setAccessKey(new SecretKeySelector(accessKeyKey, accessKeyName));
}
Aggregations