benfiola / minio-operator-ext

A Kubernetes operator that allows for declarative management of MinIO resources
13 stars 0 forks source link

Use structured tenant references for minio resources #3

Closed benfiola closed 5 months ago

benfiola commented 5 months ago

Currently, all minio resources accept a tenant field in the form of <namespace>/<name>. Within IaC projects where resources might be dynamically named or created, this means that the tenant field itself needs to be computed in an extra step. (e.g., tenant = resource.namespace + "/" + resource.name). To simplify things a bit, maybe we use properly structured tenant references instead - like tenantRef in the following example:

apiVersion: bfiola.dev/v1
kind: MinioBucket
metadata:
  name: test
spec:
  name: test
  tenantRef: 
    namespace: minio-23b8d64e
    name: minio

Thoughts?

redtex commented 5 months ago

Just perfect. And obviously much more clear for further usage, rather than <namespace>/<name> format.