Hacker News new | ask | show | jobs
by ojhughes 1203 days ago
Adding the patch api is neat! I’ve solved this in the past by embedding the entire PodSpec etc into the CRD
2 comments

Did you call your CRD "Deployment"?
It’s a common pattern [1]. Other than the GP patch example, how else can users override the child objects your controller creates?

1 https://github.com/prometheus-operator/prometheus-operator/b...

I'm not saying they shouldn't customize their PodSpec, I'm saying if they do, your controller is exactly the same as the built-in Deployment controller, running user-provided pods. Why build a copy of it?
Because it’s an aggregate of a number of different resources types and custom logic not exactly the same as deployment.

I can see you don’t like operators and that’s fine. Many folks find it’s a useful pattern to follow

I might have to borrow that! Very clever