I am just doing one POC on basic helm chart installation on my Google Kubernetes engine. When I create a new helm chart it creates certain files and folder structure automatically. Now my requirement is to create only the deployment & Pod. not the kubernetes service. Is there any way to avoid kubernetes service creation? For Ingress I can see enabled: false
property but for service it does not work.
Asked
Active
Viewed 6,698 times
4

Ady
- 584
- 8
- 16
-
Is this a public Helm chart you are using? – Vishal Biyani Jul 08 '19 at 12:08
-
I am not sure, but i think it is public helm chart only. It was pre-installed on GCP – Ady Jul 08 '19 at 12:15
-
1what is the chart name? – Dinesh Balasubramanian Jul 08 '19 at 13:13
-
Just any chart, say test-chart – Ady Jul 09 '19 at 09:50
2 Answers
4
helm create chart
command by default creates you below file hierarchy:
chart/
|
|- .helmignore # Contains patterns to ignore when packaging Helm charts.
|
|- Chart.yaml # Information about your chart
|
|- values.yaml # The default values for your templates
|
|- charts/ # Charts that this chart depends on
|
|- templates/ # The template files
|
|- templates/tests/ # The test files
So yes, you can delete unnecessary for you objects from chart/templates
directory to avoid creation them during helm install
Github source code that is responsible to create a chart directory along with the common files and directories used in a chart https://github.com/helm/helm/blob/5859403fd92bfb319ae865fcc2466701607da334/cmd/helm/create.go

Vit
- 7,740
- 15
- 40
1
I figured it out. Just delete service YAML file from templates. That will work.

Ady
- 584
- 8
- 16
-
this might be an alternative. Helm has a conditional templating. This can be achieve by wrapping the entire content within if condition. For more information: https://stackoverflow.com/a/57878852/4540216 – XPLOT1ON Jun 12 '21 at 08:03