<p>Workflow:</p>
<pre><code>apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: my-workflow-
spec:
  entrypoint: main
  arguments:
    parameters:
      - name: configmap
        value: my-configmap
      - name: secret
        value: my-secret
  templates:
    - name: main
      steps:
        - - name: main
            templateRef:
              name: my-template
              template: main
            arguments:
              parameters:
                - name: configmap
                  value: &quot;{{workflow.parameters.configmap}}&quot;
                - name: secret
                  value: &quot;{{workflow.parameters.secret}}&quot;
</code></pre>
<p>Template:</p>
<pre><code>apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
  name: my-template
spec:
  entrypoint: main
  templates:
    - name: main
      inputs:
        parameters:
          - name: configmap
        parameters:
          - name: secret
      container:
        image: my-image:1.2.3
        envFrom:
          - configMapRef:
            name: &quot;{{inputs.parameters.configmap}}&quot;
          - secretRef:
            name: &quot;{{inputs.parameters.secret}}&quot;
</code></pre>
<p>When deployed through the Argo UI I receive the following error from Kubernetes when starting the pod:</p>
<pre><code>spec.containers[1].envFrom: Invalid value: \&quot;\&quot;: must specify one of: `configMapRef` or `secretRef`
</code></pre>
<p>Using <code>envFrom</code> is supported and documented in the Argo documentation: <a href="https://argoproj.github.io/argo-workflows/fields/" rel="nofollow noreferrer">https://argoproj.github.io/argo-workflows/fields/</a>. Why is Kubernetes complaining here?</p>

Boon
<p>As mentioned in the comments, there are a couple issues with your manifests. They're valid YAML, but that YAML does not deserialize into valid Argo custom resources.</p>
<ol>
<li>In the Workflow, you have duplicated the <code>parameters</code> key in <code>spec.templates[0].inputs</code>.</li>
<li>In the WorkflowTemplate, you have placed the <code>configMapRef</code> and <code>secretRef</code> names at the same level as the keys. <code>configMapRef</code> and <code>secretRef</code> are objects, so the <code>name</code> key should be nested under each of those.</li>
</ol>
<p>These are the corrected manifests:</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
  name: my-template
spec:
  entrypoint: main
  templates:
    - name: main
      inputs:
        parameters:
          - name: configmap
          - name: secret
      container:
        image: my-image:1.2.3
        envFrom:
          - configMapRef:
              name: &quot;{{inputs.parameters.configmap}}&quot;
          - secretRef:
              name: &quot;{{inputs.parameters.secret}}&quot;

---

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: my-workflow-
spec:
  entrypoint: main
  arguments:
    parameters:
      - name: configmap
        value: my-configmap
      - name: secret
        value: my-secret
  templates:
    - name: main
      steps:
        - - name: main
            templateRef:
              name: my-template
              template: main
            arguments:
              parameters:
                - name: configmap
                  value: &quot;{{workflow.parameters.configmap}}&quot;
                - name: secret
                  value: &quot;{{workflow.parameters.secret}}&quot;
</code></pre>
<p>Argo Workflows supports <a href="https://github.com/argoproj/argo-workflows/blob/master/docs/ide-setup.md" rel="nofollow noreferrer">IDE-based validation</a> which should help you find/avoid these issues.</p>
