Figure out a way/approach to extract value from specific fields in a declarative manner.
One of the approaches that we might want to follow is to find the diff of the declared indent against the actual specifications. We might probably be able to get the specific field's actual value by comparing it against a dummy value.
For example for following declaration, we should be able to find the actual status.phase value of my-pod:
kind: Pod
apiVersion: v1
metadata:
name: my-pod
status:
phase: extract-n-register
Figure out a way/approach to extract value from specific fields in a declarative manner.
One of the approaches that we might want to follow is to find the diff of the declared indent against the actual specifications. We might probably be able to get the specific field's actual value by comparing it against a dummy value.
For example for following declaration, we should be able to find the actual status.phase value of my-pod:
References:
Alternative
Use jsonnet to do all of the above. Weigh in the pros & cons & proceed. Jsonnet as a controller needs to be supported any way.