GoogleCloudPlatform / metacontroller

Lightweight Kubernetes controllers as a service
https://metacontroller.app/
Apache License 2.0
792 stars 105 forks source link

Support for custom sub-resources #177

Open nikhilk opened 5 years ago

nikhilk commented 5 years ago

Does (or more likely, could) metacontroller support building custom sub-resources?

Context: https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/#advanced-features-and-flexibility -- the doc mentions examples of "log" and "exec" as non-CRUD operations that could be accomplished via custom sub-resources and API aggregation.

Example use-case: Given a CRD for creating/managing backups, it would be interesting to model restore as a custom sub-resource, so it is tied to a backup instance (or alternatively, as a custom sub-resource on the CRD representing the instance being restored).

Backup: /api/v1/namespaces/ns/backups/backup-name

Restore: /api/v1/namespaces/ns/backups/backup-name/restore