Implement strategic merge patch (#62)#108
Conversation
Signed-off-by: hieu2102 <hieund2102@gmail.com>
Signed-off-by: hieu2102 <hieund2102@gmail.com>
Signed-off-by: hieu2102 <hieund2102@gmail.com>
Signed-off-by: hieu2102 <hieund2102@gmail.com>
jdheyburn
left a comment
There was a problem hiding this comment.
This looks very straight forward to me. I've not tested it locally.
Should we update ExporterSpec such that it only supports enabled? Since all customisation would now be handled via the new Containers merge?
Unless they are convenient and commonly changed configs. I guess there is nothing blocking a user to modify "valkey-server" in the same way, to set |
|
@bjosv True, nothing stops the user doing that. Perhaps we can support these top-level fields for the time being. |
|
Just curious, some other operator uses podTemplateSpec, which is useful when users need volumes, initContainers(maybe example usecase where we are reading acl secrets from vault etc) |
Signed-off-by: hieu2102 <hieund2102@gmail.com>
|
@sandeepkunusoth I would image we would expose those fields (Volumes, etc.) at the root level similar to what Prometheus Operator does: https://github.com/prometheus-operator/prometheus-operator/blob/f3c143e5499e020744d57ba8a94045af71bf1a83/pkg/client/applyconfiguration/monitoring/v1/commonprometheusfields.go#L28 What example operators are you referencing? |
we can use containers maybe for now |
|
I think podTemplateSpec and containerSpec are indifferent to each other, and we have already started building on this model (we have the PR ready here). I like the idea of our operator providing some abstraction away from the pod template that we're writing on their behalf. Any fields not included in the CRD we can look to expose ourselves. I appreciate the call out though @sandeepkunusoth |
|
@hieu2102 can you try pushing a dummy commit so to retrigger the CI builds? Seems there is some hangover from a Github issue last week |
Signed-off-by: hieu2102 <hieund2102@gmail.com>
|
@jdheyburn done |
Implements #62
ContainerstoValkeyClusterSpecdeployment.mergePatchContainersdeployment.generateContainersDefanddeployment.createClusterDeploymentto returnerrorin addition to the output object