Welcome to the Linux Foundation Forum!

Lab 4.2 - A Simple DAG Workflow: apply workflow with generate name

dag-workflow.yaml

  1. apiVersion: argoproj.io/v1alpha1
  2. kind: Workflow
  3. metadata:
  4. generateName: dag-diamond-
  5. namespace: argo
  6. ...

Applying the yaml returns the following error

  1. $ kubectl apply -f dag-workflow.yaml
  2. error: from dag-diamond-: cannot use generate name with apply

I addressed this with the following change
generateName: dag-diamond- to name: dag-diamond

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Comments

  • Posts: 490

    Hi @johchung,

    Thank you for flagging this. The course has been updated.

    Best regards,
    Magda

  • Hello

    dag-workflow.yaml

    apiVersion: argoproj.io/v1alpha1
    kind: Workflow
    metadata:
    generateName: dag-diamond
    namespace: argo

    Applying the yaml returns the following error

    kubectl apply -f dag-workflow.yaml
    error: from dag-diamond: cannot use generate name with apply

    kubectl version --short

    Client Version: v1.25.2
    Kustomize Version: v4.5.7
    Server Version: v1.27.4

    Do you have any ideas?

  • Posts: 2
    edited October 2024

    kubectl apply -f dag-workflow.yaml should be changed to kubectl create -f dag-workflow.yaml

  • Posts: 2
    edited November 2024

    @mstepien I just spent a ton of time trying to figure this out. What @enigmatik777 said. Please for update the course to use kubectl create instead of kubectl apply If you use apply instead of create it results in this not so useful error:
    cannot unmarshal object into Go struct field WorkflowSpec.spec.templates of type []

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Categories

Upcoming Training