janhoy commented on code in PR #915:
URL: https://github.com/apache/solr-operator/pull/915#discussion_r4687619445


##########
controllers/common.go:
##########
@@ -46,15 +48,24 @@ func patchResource(ctx context.Context, c client.Client, 
obj client.Object, orig
        return c.Patch(ctx, obj, client.MergeFromWithOptions(orig, 
client.MergeFromWithOptimisticLock{}))
 }
 
+// takenOverLists are the atomic lists that operators before v0.10 took over 
from the applier, by writing them back with
+// the empty fields that the Go types fill in, such as a resources block on 
every container.
+var takenOverLists = []fieldpath.Path{
+       fieldpath.MakePathOrDie("spec", "customSolrKubeOptions", "podOptions", 
"initContainers"),
+       fieldpath.MakePathOrDie("spec", "customSolrKubeOptions", "podOptions", 
"sidecarContainers"),
+       fieldpath.MakePathOrDie("spec", "zookeeperRef", "provided", 
"zookeeperPodPolicy", "initContainers"),
+       fieldpath.MakePathOrDie("spec", "zookeeperRef", "provided", 
"zookeeperPodPolicy", "containers"),

Review Comment:
   Right, fixed in bb135f0. The ZooKeeper lists are now 
`spec.zookeeperRef.provided.initContainers` and `containers`, and 
`TestTakenOverListsExist` checks every path against the API types, so a path 
that does not exist fails the test.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to