title: Is it possible to load K8S list of services into Helm template variable?
body: <p>I was looking for a solution but I couldn't find any.</p>
  <p>I have a bash script which executes something like this:</p>
  <pre class="lang-sh prettyprint-override"><code>kubectl get services -o=json | \
  jq '.items[].metadata.annotations | '\
     'select (.&quot;my-ingress/enabled&quot; == &quot;true&quot;) | '\
     '{&quot;my-ingress/path&quot;, &quot;my-ingress/service-name&quot;, &quot;my-ingress/service-port&quot;}'
  </code></pre>
  <p>Which means it can take list of the services, filter and take only with annotations <code>my-ingress/enabled == true</code></p>
  <p>Based on that result it creates dynamically YAML for Ingress and loads it.</p>
  <p>Everywhere I was looking, Helm is using templates and other fancy approaches but nowhere I could find any information how to ask K8S about some resources and based on that info build YAML.</p>
  <p>Is this possible at all?</p>
  <p><strong><em>Note</em></strong>: calling Bash to prepare some kind <code>values.yaml</code> is not an option in my case.</p>