cloudfoundry-incubator / quarks-secret

Generate k8s secrets with an operator
https://quarks.suse.dev/docs/quarks-secret/
Apache License 2.0
7 stars 9 forks source link

consider separating single CRD into respective 'types' as different 'kind's #35

Closed aegershman closed 3 years ago

aegershman commented 4 years ago

Currently quarks-secret is implemented as a single CRD kind: QuarksSecret, and to control the type of credential which gets generated you specify type in the spec, e.g. password, ssh, etc. : https://github.com/cloudfoundry-incubator/quarks-secret/blob/81bcfbc9ed04ec19c76738e34b63eec9bb1031af/docs/crds/quarks_v1alpha1_quarkssecret_crd.yaml#L44-L47

You may consider separating this CRD down from a single kind of QuarksSecret into respective credential types, e.g. kind: Password, kind: Certificate, etc.; this would offer some benefits:

I don't mean to laundry-list or be negative or anything-- quarkssecret is being used in kubecf (https://github.com/cloudfoundry-incubator/kubecf/blob/20cd23b967eb04924fc16817ab4e50befe34ab52/deploy/helm/kubecf/templates/eirini.yaml#L9) and all; I'm just sharing some thoughts for consideration while the project is early in case there was concern or interest in evaluation on it. but again, not trying to yammer on, just putting it out there

thanks all for your time 👍

manno commented 4 years ago

Hey, thanks for the feedback.

I see the point about filtering, that might be usefule. However I'm afraid of the complexity more kinds will add, generating versionedclients for all of them, test setup, controller watches, different structs ...

We discussed that earlier in a meeting and the common sentiment was that Kubernetes is also using rather huge 'kinds'. Looking at the output of 'kubectl api-resources', I think that's true. There is one Volume kind, but many types of volumes. Or services, they don't even have a type, they just behave very different, depending on their spec.

I think 'filtering' can be fixed, if https://github.com/kubernetes/kubernetes/issues/53459 is implemented.

aegershman commented 3 years ago

right on, thanks again for your time - apologies for not responding back earlier 👍 closing for tidyness