vshn / appcat-service-postgresql

AppCat Service Provider for PostgreSQL
https://vshn.github.io/appcat-service-postgresql/
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Integrate provider-jet-cloudscale for Backups #74

Closed ccremer closed 2 years ago

ccremer commented 2 years ago

Summary

As cluster-admin\ I want automatic provisioning of S3 buckets and users\ So that I can finish the Backup and Restore feature for instances.

Context

Integrate https://github.com/vshn/provider-jet-cloudscale into the stack so we can provision S3 buckets for the instance backups.

Out of Scope

Further links

No response

Acceptance Criteria

Given an instance with Backups enabled
When Operator reconciles the instance CR
Then an S3 bucket from cloudscale.ch is usable and ready for K8up backups

Implementation Ideas

Idea:

This makes it possible so that the Operator can request provisioning of S3 buckets for any infrastructure and we don't need to switch-case within code. However, this also makes it more complex...

Alternatively, we can try to just provision the provider-jet-cloudscale resources directly in the code, even if that makes local development of backups with buckets harder (since one would need a cloudscale.ch account with billing set up and some test buckets).

zugao commented 2 years ago

I see crossplane being mentioned in this issue. We need first to discuss the if we still want to keep it

ccremer commented 2 years ago

I see crossplane being mentioned in this issue. We need first to discuss the if we still want to keep it

The issue with maybe getting rid of provider-helm is completely independent discussion of this issue here.

This issue here is about engineering support for different S3 providers (minio, cloudscale etc).

If we don't use want to use crossplane here, then we can either:

With Crossplane we'd essentially engineer the switch at the cluster-level, not in code. For example, to provision buckets with minio, the composition is engineered so that buckets with minio are provisioned when creating claims. To support cloudscale, in the component we "implement" the composition so it uses provider-jet-cloudscale. This is transparent for the operator, the operator doesn't know or care which S3 provider is used. This merely moves the feature to support different kinds of S3 providers outside of the code, but we need this kind of switch at some point somewhere. Complexity isn't that much reduced here, just moved to a different kind of implementation.

ccremer commented 2 years ago

As discussed internally, this is now replaced with #78