Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support round-trip serialization of CRDs #1032

Closed
stan-sz opened this issue Sep 26, 2022 · 0 comments
Closed

Support round-trip serialization of CRDs #1032

stan-sz opened this issue Sep 26, 2022 · 0 comments

Comments

@stan-sz
Copy link
Contributor

stan-sz commented Sep 26, 2022

Currently, the Yaml deserializer is configured to convert all property types to strings. After aaubry/YamlDotNet#699, it is now possible to deserialize bools and decimals with their types.

E.g.

apiVersion: foo.bar/v1alpha
kind: Foo
metadata:
  name: foo
  namespace: ns
spec:
  bool: false
  byte: 123
  float: 12.3

A call to KubernetesYaml.Deserialize and KubernetesYaml.Serialize will emit:

apiVersion: foo.bar/v1alpha
kind: Foo
metadata:
  name: foo
  namespace: ns
spec:
  bool: "false"
  byte: "123"
  float: "12.3"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant