Answers: <p>Helm supports sub charts.</p>
  <p>You could make your ingress yaml file into its own helm chart.</p>
  <p>You could then make a base chart then put both of your charts in it as subcharts.  (Or have one of your charts as the &quot;Main chart&quot; and another as a subchart.)</p>
  
Answers: CC BY-SA 4.0
Answers: 2021-10-05T17:31:56.427Z
Answers: 2021-10-05T17:31:56.427Z
Answers: Vaccano
Answers: <p>I would suggest try out Terraform with the helm provider. I work with this every day and all of our helm charts have custom values files for deployment. I guess this can be considered a &quot;best practice&quot; depending on the company. So how the flow goes:</p>
  <ol>
  <li>We have a custom app all in K8S.</li>
  <li>We set up a helm_release with terraform.</li>
  <li>We specify the custom values file =&gt; <code>file(&quot;${path.module}/kubewatch-values.yaml&quot;)</code></li>
  <li>In the terraform you can specify the chart, its version, and the name(or other settings). You also point it to the values file as above(point 3).</li>
  <li>You then apply the terraform which deploys the helm chart with your custom values file. And that should be all, its a clean and simple solution and you can have that stored in Git as well.</li>
  </ol>
  <p>Example =&gt; <a href="https://learn.hashicorp.com/tutorials/terraform/helm-provider?in=terraform/use-case" rel="nofollow noreferrer">Terraform Examples</a></p>
  
Answers: CC BY-SA 4.0
Answers: 2021-09-24T09:48:52.910Z
Answers: 2021-09-24T09:48:52.910Z
Answers: Kristian Kanchev
Body: <p>I have a Wordpress Helm chart, and a seperate ingress definition to go along with it, which I specified in a wordpress-deployment.yaml file.</p>
  <p>My workflow for installing would be:</p>
  <ul>
  <li>Install the helm chart using a wordpress-values.yaml file for values</li>
  <li>Apply the wordpress-deployment.yaml deployment file using kubectl</li>
  </ul>
  <p>I don't like that these steps are separated (e.g. what if I forget about installing the Helm chart?)</p>
  <p>I would like to use K8S in a professional setting. What would be the &quot;best practice&quot; way of going about this kind of file structure? Is there a more structured / less manual way of handling this? Ideally I would like to run 1 command which handles both installing helm charts &amp; the accompanying deployment files &amp; configurations.</p>
  <p>Thanks in advance!</p>
  
Tags: <docker><kubernetes><deployment><helm><kubernetes-helm>
Title: How to structure/combine the installation of helm + deployment files
UserDisplayName: Sander
ThreadText: # How to structure/combine the installation of helm + deployment files
  
  (Asked by: username_0 on 2021-09-23)
  
  I have a Wordpress Helm chart, and a seperate ingress definition to go along with it, which I specified in a wordpress-deployment.yaml file.
  
  My workflow for installing would be:
  
  * Install the helm chart using a wordpress-values.yaml file for values
  * Apply the wordpress-deployment.yaml deployment file using kubectl
  
  I don't like that these steps are separated (e.g. what if I forget about installing the Helm chart?)
  
  I would like to use K8S in a professional setting. What would be the "best practice" way of going about this kind of file structure? Is there a more structured / less manual way of handling this? Ideally I would like to run 1 command which handles both installing helm charts & the accompanying deployment files & configurations.
  
  Thanks in advance!
  
  **Tags:** docker, kubernetes, deployment, helm, kubernetes-helm
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2021-10-05. Score: 1
  
  Helm supports sub charts.
  
  You could make your ingress yaml file into its own helm chart.
  
  You could then make a base chart then put both of your charts in it as subcharts. (Or have one of your charts as the "Main chart" and another as a subchart.)
  
  
  ---
  
  ### Answer by username_2 on 2021-09-24. Score: 0
  
  I would suggest try out Terraform with the helm provider. I work with this every day and all of our helm charts have custom values files for deployment. I guess this can be considered a "best practice" depending on the company. So how the flow goes:
  
  1. We have a custom app all in K8S.
  2. We set up a helm\_release with terraform.
  3. We specify the custom values file => `file("${path.module}/kubewatch-values.yaml")`
  4. In the terraform you can specify the chart, its version, and the name(or other settings). You also point it to the values file as above(point 3).
  5. You then apply the terraform which deploys the helm chart with your custom values file. And that should be all, its a clean and simple solution and you can have that stored in Git as well.
  
  Example => [Terraform Examples](https://learn.hashicorp.com/tutorials/terraform/helm-provider?in=terraform/use-case)
  
  
  ---
  
  