
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
github.com/hfuss/helmify
CLI that creates Helm charts from kubernetes manifests.
Helmify reads a list of supported k8s objects from stdin and converts it to a helm chart. Designed to generate charts for k8s operators but not limited to. See examples of charts generated by helmify.
Supports Helm >=v3.6.0
Submit issue if some features missing for your use-case.
As pipe:
cat my-app.yaml | helmify mychart
Will create 'mychart' directory with Helm chart from yaml file with k8s objects.
awk 'FNR==1 && NR!=1 {print "---"}{print}' /<my_directory>/*.yaml | helmify mychart
Will create 'mychart' directory with Helm chart from all yaml files in <my_directory>
directory.
From filesystem:
helmify -f /my_directory/my-app.yaml mychart
Will create 'mychart' directory with Helm chart from my_directory/my-app.yaml
.
helmify -f /my_directory mychart
Will create 'mychart' directory with Helm chart from all yaml files in <my_directory>
directory.
helmify -f /my_directory -r mychart
Will create 'mychart' directory with Helm chart from all yaml files in <my_directory>
directory recursively.
helmify -f ./first_dir -f ./second_dir/my_deployment.yaml -f ./third_dir mychart
Will create 'mychart' directory with Helm chart from multiple directories and files.
From kustomize output:
kustomize build <kustomize_dir> | helmify mychart
Will create 'mychart' directory with Helm chart from kustomize output.
Makefile
in your operator project generated by
Operator-SDK or Kubebuilder.Makefile
:HELMIFY = $(shell pwd)/bin/helmify
helmify:
$(call go-get-tool,$(HELMIFY),github.com/arttor/helmify/cmd/helmify@v0.3.7)
helm: manifests kustomize helmify
$(KUSTOMIZE) build config/default | $(HELMIFY)
HELMIFY ?= $(LOCALBIN)/helmify
.PHONY: helmify
helmify: $(HELMIFY) ## Download helmify locally if necessary.
$(HELMIFY): $(LOCALBIN)
test -s $(LOCALBIN)/helmify || GOBIN=$(LOCALBIN) go install github.com/arttor/helmify/cmd/helmify@latest
helm: manifests kustomize helmify
$(KUSTOMIZE) build config/default | $(HELMIFY)
make helm
in project root. It will generate helm chart with name 'chart' in 'chart' directory.With Homebrew (for MacOS or Linux): brew install arttor/tap/helmify
Or download suitable for your system binary from the Releases page. Unpack the helmify binary and add it to your PATH and you are good to go!
Helmify takes a chart name for an argument. Usage:
helmify [flags] CHART_NAME
- CHART_NAME
is optional. Default is 'chart'. Can be a directory, e.g. 'deploy/charts/mychart'.
flag | description | sample |
---|---|---|
-h -help | Prints help | helmify -h |
-f | File source for k8s manifests (directory or file), multiple sources supported | helmify -f ./test_data |
-r | Scan file directory recursively. Used only if -f provided | helmify -f ./test_data -r |
-v | Enable verbose output. Prints WARN and INFO. | helmify -v |
-vv | Enable very verbose output. Also prints DEBUG. | helmify -vv |
-version | Print helmify version. | helmify -version |
-crd-dir | Place crds in their own folder per Helm 3 docs. Caveat: CRDs templating is not supported by Helm. | helmify -crd-dir |
-image-pull-secrets | Allows the user to use existing secrets as imagePullSecrets | helmify -image-pull-secrets |
-cert-manager-as-subchart | Allows the user to install cert-manager as a subchart | helmify -cert-manager-as-subchart |
-cert-manager-version | Allows the user to specify cert-manager subchart version. Only useful with cert-manager-as-subchart. (default "v1.12.2") | helmify -cert-manager-as-subchart |
Supported k8s resources:
Chart.yaml
file if presented. Done on purpose.-crd-dir
flag it is better to delete and regenerate the from scratch to ensure crds are not accidentally spliced/formatted into the same chart. Bear in mind you will want to update your Chart.yaml
thereafter.To support a new type of k8s object template:
helmify.Processor
interface. Place implementation in pkg/processor
. The package contains
examples for most k8s objects.pkg/app/app.go
test_data/kustomize.output
.Clone repo and execute command:
cat test_data/k8s-operator-kustomize.output | go run ./cmd/helmify mychart
Will generate mychart
Helm chart form file test_data/k8s-operator-kustomize.output
representing typical operator
kustomize output.
For manual testing, run program with debug output:
cat test_data/k8s-operator-kustomize.output | go run ./cmd/helmify -vv mychart
Then inspect logs and generated chart in ./mychart
directory.
To execute tests, run:
go test ./...
Beside unit-tests, project contains e2e test pkg/app/app_e2e_test.go
.
It's a go test, which uses test_data/*
to generate a chart in temporary directory.
Then runs helm lint --strict
to check if generated chart is valid.
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.