cisco-open / k8s-objectmatcher

A Kubernetes object matcher library to avoid unnecessary K8s object updates
Apache License 2.0
157 stars 29 forks source link

Is it possible to support ignoring nested fields? #57

Open lsne opened 1 year ago

lsne commented 1 year ago

I want to ignore the env field of the first container of the POD in the StatefulSet for example: spec.template.spec.containers[0].env

But it doesn't work if I set it like this: patch.IgnoreField("spec.template.spec.containers[0].env")

patch.IgnoreField() can only ignore the fields of the first layer.

Can you support fields that ignore nested levels?