forked from rook/rook
External CephObjectStores already have endpoints defined by spec.gateway.externalRgwEndpoints, and if the external store is configured with TLS (HTTPS), the store's certificates will likely not accept connections intended for the Service endpoint Rook creates. Some users might not be able to easily add the service endpoint to their certificates. Therefore, don't even bother creating a Service for external clusters. This does introduce a few issues. The Service seems to have been initially created to allow multiple external RGW endpoints to be addressable via a single address in Rook. For all connections to an external CephObjectStore with multiple endpoints, simply choose an endpoint at random. Random selection will prevent Rook from failing to create buckets or users on an external store if one of the external store's endpoints fails. The latest OBC library (lib-bucket-provisioner) allows updating the endpoints on ObjectBuckets after they are created. This allows Rook users to change endpoints on external CephObjectStores without breaking all existing OBCs. It requires implementation of the new GetUserID() library call, requires updating Provision() and Grant() calls to be idempotent, and it requires removing the Update() call. Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>