yaml vs json for the kubernetes patch #303
Answered
by
diafour
adrian-thurston
asked this question in
Q&A
|
Hi, this is a very nice project! I'm curious if it's normal to send the commands to kubernetes in yaml or in json? Yaml is more natural for us because we do all our cluster configuration in yaml. However, there doesn't appear to be a jq equivalent installed in the shell-operator container. This would be handy for manipulating the output. |
Answered by
diafour
Jul 5, 2021
Replies: 1 comment 1 reply
|
Hello! There is no "normal" way, just use what suits your needs. We use mikefarah/yq utility to convert between JSON and YAML. You can install it in your Dockerfile (we do it in deckhouse). Also, I see the problem with an "object" field for "Create" patches. I think we should allow string with YAML definition in this field for JSON patches. |
1 reply
Answer selected by
adrian-thurston
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello! There is no "normal" way, just use what suits your needs. We use mikefarah/yq utility to convert between JSON and YAML. You can install it in your Dockerfile (we do it in deckhouse).
Also, I see the problem with an "object" field for "Create" patches. I think we should allow string with YAML definition in this field for JSON patches.