Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yeahdongcn/kustohelmize
Tired of creating Helm Charts from scratch? Try Kustohelmize today!
https://github.com/yeahdongcn/kustohelmize
helm kubernetes kustomize
Last synced: 3 months ago
JSON representation
Tired of creating Helm Charts from scratch? Try Kustohelmize today!
- Host: GitHub
- URL: https://github.com/yeahdongcn/kustohelmize
- Owner: yeahdongcn
- License: mit
- Created: 2022-07-18T05:55:35.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-27T08:09:17.000Z (5 months ago)
- Last Synced: 2024-10-16T04:13:27.956Z (4 months ago)
- Topics: helm, kubernetes, kustomize
- Language: Go
- Homepage:
- Size: 287 KB
- Stars: 14
- Watchers: 5
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Kustohelmize
[![Go Report Card](https://goreportcard.com/badge/github.com/yeahdongcn/kustohelmize)](https://goreportcard.com/report/github.com/yeahdongcn/kustohelmize)
Kustohelmize lets you easily create a Helm Chart from a [kustomized](https://github.com/kubernetes-sigs/kustomize) YAML file.
## CLI
kustohelmize
```
❯ ./kustohelmize
Automate Helm chart creation from any existing Kubernetes manifestsUsage:
kustohelmize [command]Available Commands:
completion Generate the autocompletion script for the specified shell
create Create a chart from a given YAML file
help Help about any command
version print the client version informationFlags:
-h, --help help for kustohelmizeUse "kustohelmize [command] --help" for more information about a command.
```kustohelmize create
```
❯ ./kustohelmize create --help
Create a new Helm chartUsage:
kustohelmize create NAME [flags]Flags:
-a, --app-version string The version of the application enclosed inside of this chart
-d, --description string A one-sentence description of the chart
-f, --from string The path to a kustomized YAML file
-h, --help help for create
-k, --kubernetes-split-yaml-command string kubernetes-split-yaml command (path to executable) (default "kubernetes-split-yaml")
-p, --starter string the name or absolute path to Helm starter scaffold
-s, --suppress-namespace Whether to suppress creation of namespace resource, which Kustomize will emit. RBAC bindings for SAs will be to {{ .Release.Namespace }}
-v, --version string A SemVer 2 conformant version string of the chart
```## User scenario
### Work with [kustomize](https://kustomize.io/).
Say you have a project created by [Operator SDK](https://sdk.operatorframework.io/) and the `Makefile` should look like this:
```Makefile
.PHONY: deploy
deploy: manifests kustomize ## Deploy controller to the K8s cluster specified in ~/.kube/config.
cd config/manager && $(KUSTOMIZE) edit set image controller=${IMAGE}
$(KUSTOMIZE) build config/default | kubectl apply -f -
````make deploy` will create the YAML file with `kustomize` and deploy it into the cluster. This might be good enough during development, but may not very helpful for end-users.
We can slightly duplicate the target and update it like this:
```Makefile
.PHONY: helm
helm: manifests kustomize kustohelmize
cd config/manager && $(KUSTOMIZE) edit set image controller=${IMAGE}
$(KUSTOMIZE) build config/default --output config/production.yaml
$(KUSTOHELMIZE) --from=config/production.yaml create mychart
```Then a Helm chart with default configurations will be created for you. The directory hierarchy will look like this:
```
.
├── mychart
├── mychart-generated
└── mychart.config
```The full example from scratch can be found at [examples](https://github.com/yeahdongcn/kustohelmize/tree/main/examples).
Note that you can use this tool in an ad-hoc manner against any YAML file containing multiple resources to generate a helm chart skeleton simply by pointing `--from` at that file.
## Community
* [Open an issue](https://github.com/yeahdongcn/kustohelmize/issues/new)