title: helm deploy with no objects
body: <p>I'm doing a very simple chart with helm. 
  It consists on deploying a chart with just one object ("/templates/pod.yaml"), that have to be deployed just if a  parameter of file Values.yaml is true. 
  To provide an example of my case, this is what I have:</p>
  
  <p><strong>/templates/pod.yaml</strong></p>
  
  <pre><code>{{- if eq .Values.shoudBeDeployed true }}
  apiVersion: v1
  kind: Pod
  metadata:
    name: nginx
    labels:
      name: nginx
  spec:
    containers:
    - name: nginx
      image: nginx
      ports:
      - containerPort: 80
  {{- end}}
  </code></pre>
  
  <p><strong>Values.yaml</strong></p>
  
  <pre><code>shoudBeDeployed: true
  </code></pre>
  
  <p>So when I use shoudBeDeployed with <code>true</code> value, helm installs it correctly. </p>
  
  <p>My problem is that when shoudBeDeployed is <code>false</code>, helm doesn't deploy anything (as I expected), but helm shows the following message:</p>
  
  <p><code>Error: release CHART_NAME failed: no objects visited</code> </p>
  
  <p>And if I execute <code>helm ls</code> I get that CHART_NAME is deployed with <code>STATUS FAILED</code>.</p>
  
  <p>My question is if there is a way to not have it as a failed helm deploy. So I would like to not see it when using the command <code>helm ls</code></p>
  
  <p>I know that I could move the logic of shoudBeDeployed variable outside the chart, and then deploy the chart or not depending on its value, but I would like to know if there is a solution just using helm.</p>