Skip to content

[Feature] why this workflowrun demo failed.  #186

@Growing111

Description

@Growing111

I use this demo
https://github.com/kubevela/workflow/blob/main/examples/workflow-run/apply-applications.yaml

yaml is

apiVersion: core.oam.dev/v1alpha1
kind: WorkflowRun
metadata:
  name: apply-applications
  namespace: default
  annotations:
    workflowrun.oam.dev/debug: "true"
spec:
  workflowSpec:
    steps:
      - name: apply-app2
        type: apply-app
        properties:
          ref:
            name: my-app
            key: application
            type: configMap
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: my-app
  namespace: default
data:
  application: |
    apiVersion: core.oam.dev/v1beta1
    kind: Application
    metadata:
      name: webservice-app2
    spec:
      components:
        - name: express-server2
          type: webservice
          properties:
            image: crccheck/hello-world
            ports:
              - port: 8000

kubevela version : v1.8.1
workflow version: v0.5.0

result:

the workflowrun status is failed

error message :

 run step(provider=kube,do=apply): the body of the request was in an unknown format - accepted media types include: application/json-patch+json, application/merge-patch+json, application/apply-patch+yaml

but webservice-app2 application is running and have a pod express-server2-58f7474c55-txqxk is runing

the next ,The yaml file I use under configMap is in another namespace test

apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
  name: webservice-app2
  namespace: test
spec:
  components:
    - name: express-server2
      type: webservice
      properties:
        image: crccheck/hello-world
        ports:
          - port: 8000

the application in namespace test is successed and running ,

why apply-applications workflowrun prompt messaget is unknown format and status is failed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions