according to jsonpath.com the path to that label value is .metadata.labels.['app.kubernetes.io/name'].
Labels and Annotations are simplest and most frequent case to have dot(.) in the key. Developers can easily create CRD with map[string][string] or map[string]Object in their spec.
Please correct me if I'm wrong, it seems current util/jsonpath package does not support ['']. In the cases above, the FindResults() in util/jsonpath won't be able to find the right result(s). :(
If an object contains dot (.) in the key, such as
according to jsonpath.com the path to that label value is
.metadata.labels.['app.kubernetes.io/name']
.Labels
andAnnotations
are simplest and most frequent case to have dot(.) in the key. Developers can easily create CRD withmap[string][string]
ormap[string]Object
in theirspec
.Please correct me if I'm wrong, it seems current util/jsonpath package does not support
['
']
. In the cases above, the FindResults() in util/jsonpath won't be able to find the right result(s). :(Will you consider that feature?