3 ms·
Adding the patch api is neat! I’ve solved this in the past by embedding the entire PodSpec etc into the CRD
by ojhughes 4y ago
Adding the patch api is neat! I’ve solved this in the past by embedding the entire PodSpec etc into the CRD
- sklarsa 4y agoI might have to borrow that! Very clever
- remram 4y agoDid you call your CRD "Deployment"?
- ojhughes 4y agoIt’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/blob/main/Documentation/api.md https://github.com/prometheus-operator/prometheus-operator/b...
- remram 4y agoI'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?
- ojhughes 4y agoBecause 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