K8SPS-567: helm chart generation #1168
Open
+2,416
−166
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
https://perconadev.atlassian.net/browse/K8SPS-567
DESCRIPTION
This PR adds a generate-helm-chart Makefile target that generates a Helm chart for the PS operator. Specifically
values.yamlandcluster.yaml.The
values.yamlfile is created with the same tool used to generatedeploy/cr.yamlwith all fields specified (cmd/example-gen/cmd/cr-gen). We then post-process the resultingcr.yamlincmd/example-gen/scripts/generate.shto keep the original structure of our Helm chart.The
cluster.yamlfile is created by a new tool,cmd/example-gen/cmd/chart-gen. It is based on https://github.com/elastic/crd-ref-docs, but instead of generating documentation we use it to parse thePerconaServerMySQLtype and feed that data into our go templatecmd/example-gen/cmd/chart-gen/templates/helm.tplto render the chart.In the future it will be easy to modify this new tool to generate a
README.mdfor the Helm chart.CHECKLIST
Jira
Needs Doc) and QA (Needs QA)?Tests
Config/Logging/Testability