<p>We'd like to use <a href="https://github.com/tektoncd/experimental" rel="nofollow noreferrer">Tekton experimental features</a> such as the <a href="https://github.com/tektoncd/experimental/tree/main/pipelines-in-pipelines" rel="nofollow noreferrer">Pipelines In Pipelines feature</a>. We already <a href="https://github.com/tektoncd/experimental/tree/main/pipelines-in-pipelines#install" rel="nofollow noreferrer">installed the feature as described in the README</a> via <code>kubectl apply</code> but end up in an error like this:</p>
<pre><code>Pipeline default/buildpacks-test-pipeline can't be Run; it contains Tasks that don't exist: Couldn't retrieve Task &quot;generic-gitlab-set-status&quot;: tasks.tekton.dev &quot;generic-gitlab-set-status&quot; not found
</code></pre>
<p>In <a href="https://github.com/tektoncd/experimental/issues/785" rel="nofollow noreferrer">this issue</a> it is stated, that we need to enable Tekton alpha features in our deployment. In the Tekton docs at <a href="https://tekton.dev/docs/pipelines/install/#customizing-the-pipelines-controller-behavior" rel="nofollow noreferrer">Customizing the Pipelines Controller behavior</a> all feature flags are described - including the <a href="https://tekton.dev/docs/pipelines/install/#alpha-features" rel="nofollow noreferrer">Alpha Features</a>. The docs state we should change the <code>enable-api-fields:</code> field from <code>stable</code> to <code>alpha</code> if we want to use those features.</p>
<p>The recommended way of <a href="https://tekton.dev/docs/pipelines/install/#installing-tekton-pipelines-on-kubernetes" rel="nofollow noreferrer">installing Tekton Pipelines</a> is to use <code>kubectl apply</code> leveraging a remotely served yaml file:</p>
<pre><code>kubectl apply --filename https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml
</code></pre>
<p>Inside we see the <code>ConfigMap</code> <code>feature-flags</code> (shortened):</p>
<pre><code>apiVersion: v1
kind: ConfigMap
metadata:
  name: feature-flags
  namespace: tekton-pipelines
  labels:
    app.kubernetes.io/instance: default
    app.kubernetes.io/part-of: tekton-pipelines
data:
  ...
  # Setting this flag will determine which gated features are enabled.
  # Acceptable values are &quot;stable&quot; or &quot;alpha&quot;.
  enable-api-fields: &quot;stable&quot;
  ...
</code></pre>
<p><strong>Is there a way to change the <code>enable-api-fields</code> field to <code>alpha</code> somehow on-the-fly without the need to store</strong> (and in the long run maintain) <strong>the official Tekton pipeline yaml file?</strong></p>

jonashackt
<p>A simple combination of <code>curl</code> which downloads the file and pipes it into <code>sed</code>, which substitutes the <code>stable</code> to <code>alpha</code> works like a charm - especially since this flag is the only line including <code>stable</code> (except of the commentary line directly above). <code>sed</code> is a common tool to <a href="https://stackoverflow.com/a/70152914/4964553">set dynamic values with Kubernetes yaml file</a>.</p>
<p>You may test-drive it adding a <code>grep</code> at the end to see the lines changed with:</p>
<pre><code>curl https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml | sed &quot;s#stable#alpha#g&quot; | grep enable-api-fields
</code></pre>
<p>Now combining the command with a final <code>kubectl apply -f -</code> (instead of <code>grep</code>) will do what was asked for:</p>
<pre><code>curl https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml | sed &quot;s#stable#alpha#g&quot; | kubectl apply -f -
</code></pre>
<p>Now the officially released Tekton pipelines yaml is configured to use alpha features on-the-fly - without the need to store and maintain the <code>ConfigMap</code> in a custom git repository for example.</p>
