Closed ripta closed 1 year ago
Assuming in.yaml containing:
in.yaml
apiVersion: test/v1 kind: ReplicatedDatabase metadata: name: customers annotations: prometheus.io/scrape: "true" spec: {}
and then running dyff yaml in.yaml > out.yaml, I get the following content in out.yaml:
dyff yaml in.yaml > out.yaml
out.yaml
--- apiVersion: test/v1 kind: ReplicatedDatabase metadata: name: customers annotations: prometheus.io/scrape: true spec: {}
where unfortunately "true" (a string) is incorrectly converted into true (a bool). I'd have expected dyff to leave the type alone.
"true"
true
(Implementation detail: in Kubernetes, annotations are map[string]string, so the value must be treated as a string.)
map[string]string
Thanks for bringing it up. I did not have much time lately for the projects, so sorry for the belated response. It should be fixed in the newest release. Let me know whether this works for you.
Assuming
in.yaml
containing:and then running
dyff yaml in.yaml > out.yaml
, I get the following content inout.yaml
:where unfortunately
"true"
(a string) is incorrectly converted intotrue
(a bool). I'd have expected dyff to leave the type alone.(Implementation detail: in Kubernetes, annotations are
map[string]string
, so the value must be treated as a string.)