quarkus-google-cloud-services icon indicating copy to clipboard operation
quarkus-google-cloud-services copied to clipboard

Enhance storage client creation (optional and multiple)

Open JiriOndrusek opened this issue 3 years ago • 2 comments

I'm working on camel-quarkus extension for google-storage apache/camel-quarkus#2421

It would be nice to have:

  • Optional client registration. For example for the JUnit test using test container, I need to create client manually. But if I don't fill application.properties (e.g. quarkus.google.cloud.service-account-location), I get

java.io.IOException: The Application Default Credentials are not available

  • Multiple clients registration. It is possible in camel to define several endpoints, each using different client - selected via @Named. Having an option to define multiple clients via application.properties would help a lot.

JiriOndrusek avatar Apr 29 '21 08:04 JiriOndrusek

@JiriOndrusek what you call an optional client is a client that is not authenticated to GCP. For this you'll need to provide a mock to GoogleCloudCredentials, I added a section in the README to explain how to do this, you can find a full exemple in the main integration test.

loicmathieu avatar May 14 '21 12:05 loicmathieu

@loicmathieu Thank you. I'll look into it.

JiriOndrusek avatar May 14 '21 12:05 JiriOndrusek