-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Describe the bug
i tried submit argo workflow use python which is "hello-word" dsl, but failed Could help me have a look?
python code:
from argo.workflows.dsl import Workflow
from argo.workflows.dsl import template
import yaml
from argo.workflows.dsl.templates import V1Container
class HelloWorld(Workflow):
entrypoint = "whalesay"
@template
def whalesay(self) -> V1Container:
container = V1Container(
image="docker/whalesay:latest",
name="whalesay",
command=["cowsay"],
args=["hello world"]
)
return container
wf=HelloWorld()
print(wf)
from argo.workflows.client import V1alpha1Api
from argo.workflows.config import load_kube_config
load_kube_config() # loads local configuration from ~/.kube/config
v1alpha1 = V1alpha1Api()
wfs = v1alpha1.list_namespaced_workflows(namespace="default")
print(wfs)
#v1alpha1.create_namespaced_workflow("default", wf)
wf.submit(client=V1alpha1Api(), namespace="default")
i can get wfs by client and print, but submit failed throw 400 exception
Screenshots

