Skip to content

Conversation

@robbat2
Copy link

@robbat2 robbat2 commented Dec 24, 2025

Reference: https://github.com/kubernetes/enhancements/blob/master/keps/sig-cli/5295-kyaml/README.md
Co-authored-by: Codex codex@openai.com
Generated-with: OpenAI Codex CLI (partial)
Signed-off-by: Robin H. Johnson rjohnson@coreweave.com

robbat2 and others added 2 commits December 23, 2025 17:00
Reference: https://github.com/kubernetes/enhancements/blob/master/keps/sig-cli/5295-kyaml/README.md
Co-authored-by: Codex <codex@openai.com>
Generated-with: OpenAI Codex CLI (partial)
Signed-off-by: Robin H. Johnson <rjohnson@coreweave.com>
Signed-off-by: Robin H. Johnson <rjohnson@coreweave.com>
edwinjhlee
flox
flox
unlabeled
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unlabelled (double l) for UK english, which this project's locale

}

for _, s := range scenarios {
testKYamlScenario(t, s)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add 'documentScenarios' here so we can generate docs based off these tests :)

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'll also need to add a header/kyaml.md (see the other formats for examples 👍🏼 )


.PHONY: build/dev
build/dev: test *.go
build/dev: *.go
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this accidental? pls revert

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will revert for now; but I was finding it hindered rapid development. I do want to test - but the slow test targets in the Makefile shouldn't be a pre-req for a quick development build.

return nil
}

func (ke *kyamlEncoder) PrintLeadingContent(writer io.Writer, content string) error {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this the same logic as the yaml encoder? Could it be pulled out into a common function?

" ],\n" +
" # trailing\n" +
"}\n",
},
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good to add some more tests in here, plain scalars, maybe converting from yaml to kyaml to show the difference (particularly when you add documentScenarios in.

@mikefarah
Copy link
Owner

Nice work codex + @robbat2 - couple of comments to resolve

@mikefarah
Copy link
Owner

Oh other thing to add are the compiler directives to allow for minimal builds (e..g //go:build !yq_nohcl)

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

Successfully merging this pull request may close these issues.

2 participants