Search in sources :

Example 1 with GoogleCloudSecretKeySelector

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

the class BackupConfigSourceValidatorTest method setGcsCredentials.

private void setGcsCredentials(final BackupConfigReview review, String serviceAccountJsonKeyName, String serviceAccountJsonKeyKey) {
    BackupStorage storage = review.getRequest().getObject().getSpec().getStorage();
    storage.setType("gcs");
    storage.setGcs(new GoogleCloudStorage());
    storage.getGcs().setCredentials(new GoogleCloudCredentials());
    storage.getGcs().getCredentials().setSecretKeySelectors(new GoogleCloudSecretKeySelector());
    GoogleCloudSecretKeySelector awsSecretKeySelector = storage.getGcs().getCredentials().getSecretKeySelectors();
    awsSecretKeySelector.setServiceAccountJsonKey(new SecretKeySelector(serviceAccountJsonKeyKey, serviceAccountJsonKeyName));
}
Also used : GoogleCloudSecretKeySelector(io.stackgres.common.crd.storages.GoogleCloudSecretKeySelector) GoogleCloudStorage(io.stackgres.common.crd.storages.GoogleCloudStorage) BackupStorage(io.stackgres.common.crd.storages.BackupStorage) GoogleCloudCredentials(io.stackgres.common.crd.storages.GoogleCloudCredentials) 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)

Aggregations

SecretKeySelector (io.stackgres.common.crd.SecretKeySelector)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 GoogleCloudCredentials (io.stackgres.common.crd.storages.GoogleCloudCredentials)1 GoogleCloudSecretKeySelector (io.stackgres.common.crd.storages.GoogleCloudSecretKeySelector)1 GoogleCloudStorage (io.stackgres.common.crd.storages.GoogleCloudStorage)1