Output of helm version: v3.14.0
Output of kubectl version: v1.29.1
Cloud Provider/Platform (AKS, GKE, Minikube etc.): microk8s
Description
Currently, the helm create command generates default files based on predefined templates hardcoded in Helm's source code. It would be useful to allow users to define their own templates for these files in a configurable manner, for example, by specifying a directory in ~/.config/helm/init_helm or another configurable location.
Problem
The base files (such as ingress.yaml, deployment.yaml, and service.yaml) are currently hardcoded in the Helm code. Users who frequently need to modify these files or apply organization-specific customizations after running helm create must do so manually. This can be time-consuming and error-prone, especially in environments where Helm is used extensively to bootstrap projects.
Proposal
Add the ability to specify custom template files or directories, which Helm will use when generating the basic structure with helm create.
- This could be done by allowing users to place custom template files in a directory like ~/.config/helm/init_helm (or any user-configurable path).
- If a custom template exists in the specified directory, it will override the default template used by Helm.
- If no custom templates are found, Helm would fallback to the default hardcoded templates.
Benefits
- This feature would increase flexibility and save time for users who need specific configurations in their Helm charts.
- It would allow for standardized templates across teams and organizations, improving consistency and reducing manual errors.
- The feature would also support a more modular approach to Helm chart development, making it easier to share and maintain custom templates.
Source:
|
const defaultChartfile = `apiVersion: v2 |
Output of
helm version: v3.14.0Output of
kubectl version: v1.29.1Cloud Provider/Platform (AKS, GKE, Minikube etc.): microk8s
Description
Currently, the helm create command generates default files based on predefined templates hardcoded in Helm's source code. It would be useful to allow users to define their own templates for these files in a configurable manner, for example, by specifying a directory in ~/.config/helm/init_helm or another configurable location.
Problem
The base files (such as ingress.yaml, deployment.yaml, and service.yaml) are currently hardcoded in the Helm code. Users who frequently need to modify these files or apply organization-specific customizations after running helm create must do so manually. This can be time-consuming and error-prone, especially in environments where Helm is used extensively to bootstrap projects.
Proposal
Add the ability to specify custom template files or directories, which Helm will use when generating the basic structure with helm create.
Benefits
Source:
helm/pkg/chartutil/create.go
Line 80 in d7b4c38