Show HN: "Kubectl-split", to split multi-YAML into individual files
1–7 of 7 posts
Re: Show HN: "Kubectl-split", to split multi-YAML into individual files
#2Re: Show HN: "Kubectl-split", to split multi-YAML into individual files
#3Go Templates, for the curious:
Re: Show HN: "Kubectl-split", to split multi-YAML into individual files
#4This is done by parsing the YAML code and giving you the option to access any key from the YAML object using Go Templates. Go Templates, for the curious: https://pkg.go.dev/text/template
Re: Show HN: "Kubectl-split", to split multi-YAML into individual files
#5is there a mode to split based on referencing to each other? eg: i declare a secret and mount it as volume in deployment => put them to a same file?
For Kubernetes' own resources it might be easy to code. For CRDs, that's a whole other world.
One solution: annotate both the deployment and the secret, then use the name template to export them into the same file or, in other words, split based on annotations. Hope that helps!
Re: Show HN: "Kubectl-split", to split multi-YAML into individual files
#6This is done by parsing the YAML code and giving you the option to access any key from the YAML object using Go Templates. Go Templates, for the curious: https://pkg.go.dev/text/template
I'll take it as a call to action to link it from the docs. Thanks for checking it out!
If you want people to be interested or care, you have to imagine that you are them - they don’t know all the things you know.
(This is not about your project. I just wanted to get that off my chest. ;)
Re: Show HN: "Kubectl-split", to split multi-YAML into individual files
#7Earlier quoted context omitted.
I'll take it as a call to action to link it from the docs. Thanks for checking it out!
Way too many “Show HNs” don’t explain what the project is or why it’s useful or suggested uses, how to download, how to build, supported platforms, dependencies. There must be a checklist somewhere… If you want people to be interested or care, you have to imagine that you are them - they don’t know all the things you know. (This is not about your project. I just wanted to get that off my chest. ;)