Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Object storage v2 beta controller #2

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

visdmin
Copy link
Owner

@visdmin visdmin commented Oct 31, 2023

Entities and controller to be added:

  • V1Alpha1ObjectStorage2
  • V1Alpha1ObjectStorage2AccessKey

Controller features (V1Alpha1ObjectStorage2):

  • Add entity and empty controller
  • Show existing os2 instance and keep entity status up to date
  • Create new os2 instance
  • Update existing os2 istance according on entity Spec when state does not match
  • Delete os2 instance

Controller features (V1Alpha1ObjectStorage2AccessKey):

  • Add entity and empty controller
  • Create new access keys and store access key secret to k8s secret entity
  • List exising access keys
  • Update exising access according to entity Spec when state does not match (mainly AccessKey.Enabled)
  • Delete access keys

Add UpCloudApiClient project and required methods:

  • GET object storage 2 details
  • POST create object storage 2 instance
  • DELETE delete object storage 2 instance
  • PUT replace object storage 2 instance
  • POST create access key
  • GET get access key details
  • DELETE delete access key
  • PUT update access key

WIP !!!

visdmin and others added 7 commits October 29, 2023 01:46
… load existing entities from the api.

This maybe very bad idea.
Feature is nice to have, but the implementation of such behaviour should be maybe isolated to separate K8s job ?
Lets keep it here for now, and think about better solution in the future.
Author suspects that it's not the purpose of the operator to do such a task, much better way could to be define CRD `LoadUpCloudEntitiesJob` or something similar, that would be handle the loading of the entities from the UpC api.

- UpCloud Api client tested locally little here before these changes.
- Creation of new entities seems to work fine with auto loader.

```shell
$ kubectl -n default get objectstorage2s.api.upcloud.com
NAME                                                     RECONCILESTATE   ID                                     CONFIGUREDSTATUS   OPERATIONALSTATE   REGION     UPDATEDAT
object-storage-v2-12c5cbc2-3013-491f-a6f4-eeb38edcda4c   UP_TO_DATE       12c5cbc2-3013-491f-a6f4-eeb38edcda4c   started            running            europe-1   2023-10-30T21:24:00
```
@visdmin visdmin added the feature New feature or request label Oct 31, 2023
@visdmin visdmin added this to the release-0.1.0 milestone Oct 31, 2023
@visdmin visdmin self-assigned this Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant