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));
}
Aggregations