mayadata-io / mayadata-io/d-operators
extract & register value(s) in a declarative way
@ksatchit is already working on this.
Since Feb 26, 2020.
- Dominant language
- Go
- Stars
- 10
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
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
References:
- https://github.com/go-test/deep
- https://github.com/kr/pretty/blob/main/diff_test.go
- https://github.com/kylelemons/godebug
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.