Search in sources :

Example 1 with AwsS3CompatibleStorage

use of io.stackgres.common.crd.storages.AwsS3CompatibleStorage in project stackgres by ongres.

the class BackupConfigSourceValidatorTest method setS3CompatibleCredentials.

private void setS3CompatibleCredentials(final BackupConfigReview review, String accessKeyIdName, String accessKeyIdKey, String secretAccessKeyName, String secretAccessKeyKey) {
    BackupStorage storage = review.getRequest().getObject().getSpec().getStorage();
    storage.setType("s3compatible");
    storage.setS3Compatible(new AwsS3CompatibleStorage());
    storage.getS3Compatible().setAwsCredentials(new AwsCredentials());
    storage.getS3Compatible().getAwsCredentials().setSecretKeySelectors(new AwsSecretKeySelector());
    AwsSecretKeySelector awsSecretKeySelector = storage.getS3Compatible().getAwsCredentials().getSecretKeySelectors();
    awsSecretKeySelector.setAccessKeyId(new SecretKeySelector(accessKeyIdKey, accessKeyIdName));
    awsSecretKeySelector.setSecretAccessKey(new SecretKeySelector(secretAccessKeyKey, secretAccessKeyName));
}
Also used : BackupStorage(io.stackgres.common.crd.storages.BackupStorage) AwsSecretKeySelector(io.stackgres.common.crd.storages.AwsSecretKeySelector) AwsCredentials(io.stackgres.common.crd.storages.AwsCredentials) SecretKeySelector(io.stackgres.common.crd.SecretKeySelector) AzureBlobSecretKeySelector(io.stackgres.common.crd.storages.AzureBlobSecretKeySelector) AwsSecretKeySelector(io.stackgres.common.crd.storages.AwsSecretKeySelector) GoogleCloudSecretKeySelector(io.stackgres.common.crd.storages.GoogleCloudSecretKeySelector) AwsS3CompatibleStorage(io.stackgres.common.crd.storages.AwsS3CompatibleStorage)

Aggregations

SecretKeySelector (io.stackgres.common.crd.SecretKeySelector)1 AwsCredentials (io.stackgres.common.crd.storages.AwsCredentials)1 AwsS3CompatibleStorage (io.stackgres.common.crd.storages.AwsS3CompatibleStorage)1 AwsSecretKeySelector (io.stackgres.common.crd.storages.AwsSecretKeySelector)1 AzureBlobSecretKeySelector (io.stackgres.common.crd.storages.AzureBlobSecretKeySelector)1 BackupStorage (io.stackgres.common.crd.storages.BackupStorage)1 GoogleCloudSecretKeySelector (io.stackgres.common.crd.storages.GoogleCloudSecretKeySelector)1