You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
我尝试安装http://kubevela.net/zh/docs/tutorials/k8s-object-rollout 部署金丝雀,在day-02步骤的时候vela workflow resume canary-demo 是可以的,但是我通过RESTAPI
curl -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImFkbWluIiwiZ3JhbnRUeXBlIjoiYWNjZXNzIiwiZXhwIjoxNjcwNDg1OTg3LCJpc3MiOiJ2ZWxhLWlzc3VlciIsIm5iZiI6MTY3MDQ4MjM4N30.PgVuq8adJ29pgVKMt4Eh8GxDHSkPDAYRwFMwXexASLg" -G "10.0.0.18:8000/api/v1/applications/canary-demo/workflows/workflow-default/records/workflow-default-20221208063451256/resume"
{
"BusinessCode": 500,
"Message": "workflow is still running, can not operate a running workflow"
}
却返回错误?
查询records
curl -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImFkbWluIiwiZ3JhbnRUeXBlIjoiYWNjZXNzIiwiZXhwIjoxNjcwNDg1OTg3LCJpc3MiOiJ2ZWxhLWlzc3VlciIsIm5iZiI6MTY3MDQ4MjM4N30.PgVuq8adJ29pgVKMt4Eh8GxDHSkPDAYRwFMwXexASLg" -G "10.0.0.18:8000/api/v1/applications/canary-demo/workflows/workflow-default/records"
{
"records": [
{
"name": "workflow-default-20221207094713611",
"namespace": "default",
"workflowName": "workflow-default",
"workflowAlias": "Default Workflow",
"applicationRevision": "20221207094713606",
"startTime": "2022-12-07T09:47:13.780604326Z",
"status": "complete",
"steps": [
{
"id": "zfzydpg162",
"name": "default",
"alias": "Deploy To default",
"type": "deploy",
"phase": "succeeded",
"firstExecuteTime": "2022-12-07T09:47:14Z",
"lastExecuteTime": "2022-12-07T09:47:17Z"
}
]
},
{
"name": "workflow-default-20221207094928445",
"namespace": "default",
"workflowName": "workflow-default",
"workflowAlias": "Default Workflow",
"applicationRevision": "20221207094928439",
"startTime": "2022-12-07T09:49:28.650334331Z",
"status": "complete",
"steps": [
{
"id": "7bid44ewus",
"name": "default",
"alias": "Deploy To default",
"type": "deploy",
"phase": "succeeded",
"firstExecuteTime": "2022-12-07T09:49:29Z",
"lastExecuteTime": "2022-12-07T09:55:12Z"
}
]
},
{
"name": "workflow-default-20221208054813353",
"namespace": "default",
"workflowName": "workflow-default",
"workflowAlias": "Default Workflow",
"applicationRevision": "20221208054813345",
"startTime": "2022-12-08T05:48:13.539630039Z",
"status": "complete",
"steps": [
{
"id": "l1wmwyh76v",
"name": "default",
"alias": "Deploy To default",
"type": "deploy",
"phase": "succeeded",
"firstExecuteTime": "2022-12-08T05:48:13Z",
"lastExecuteTime": "2022-12-08T06:17:56Z"
}
]
},
{
"name": "workflow-default-20221208063451256",
"namespace": "default",
"workflowName": "workflow-default",
"workflowAlias": "Default Workflow",
"applicationRevision": "20221208063451250",
"startTime": "2022-12-08T06:34:51.43451585Z",
"status": "running",
"steps": [
{
"id": "4wyqusyncn",
"name": "default",
"alias": "Deploy To default",
"type": "deploy",
"phase": "running",
"message": "local/default/canary-demo is not healthy",
"reason": "Wait",
"firstExecuteTime": "2022-12-08T06:34:51Z",
"lastExecuteTime": "2022-12-08T07:13:34Z"
}
]
}
],
"total": 4
应用配置:
Application(canary-demo)
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
annotations:
app.oam.dev/appAlias: ""
app.oam.dev/appName: canary-demo
app.oam.dev/deployVersion: ""
app.oam.dev/publishVersion: workflow-default-20221208071518401
app.oam.dev/workflowName: workflow-default
creationTimestamp: null
labels:
app.oam.dev/appName: canary-demo
app.oam.dev/source-of-truth: from-velaux
name: canary-demo
namespace: default
resourceVersion: "37169760"
spec:
components:
properties:
cpu: "0.5"
exposeType: NodePort
image: barnett/canarydemo:v2
memory: 1024Mi
ports:
port: 8090
protocol: TCP
traits:
replicas: 5
type: scaler
auto: false
canary:
steps:
- weight: 20
- weight: 80
type: kruise-rollout
type: webservice
policies:
properties:
clusters:
namespace: default
type: topology
workflow:
steps:
properties:
policies:
type: deploy
status: {}
Application(canary-demo) -- Component(canary-demo)
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
app.oam.dev/appAlias: ""
app.oam.dev/appName: canary-demo
app.oam.dev/deployVersion: ""
app.oam.dev/publishVersion: workflow-default-20221208071518401
app.oam.dev/workflowName: workflow-default
labels:
app.oam.dev/appName: canary-demo
app.oam.dev/appRevision: ""
app.oam.dev/component: canary-demo
app.oam.dev/name: canary-demo
app.oam.dev/namespace: default
app.oam.dev/resourceType: WORKLOAD
app.oam.dev/source-of-truth: from-velaux
workload.oam.dev/type: webservice
name: canary-demo
namespace: default
spec:
replicas: 5
selector:
matchLabels:
app.oam.dev/component: canary-demo
template:
metadata:
labels:
app.oam.dev/component: canary-demo
app.oam.dev/name: canary-demo
spec:
containers:
- image: barnett/canarydemo:v2
name: canary-demo
ports:
- containerPort: 8090
name: port-8090
protocol: TCP
resources:
limits:
cpu: "0.5"
memory: 1024Mi
requests:
cpu: "0.5"
memory: 1024Mi
From the auxiliary workload
apiVersion: v1
kind: Service
metadata:
annotations:
app.oam.dev/appAlias: ""
app.oam.dev/appName: canary-demo
app.oam.dev/deployVersion: ""
app.oam.dev/publishVersion: workflow-default-20221208071518401
app.oam.dev/workflowName: workflow-default
labels:
app.oam.dev/appName: canary-demo
app.oam.dev/appRevision: ""
app.oam.dev/component: canary-demo
app.oam.dev/name: canary-demo
app.oam.dev/namespace: default
app.oam.dev/resourceType: TRAIT
app.oam.dev/source-of-truth: from-velaux
trait.oam.dev/resource: webserviceExpose
trait.oam.dev/type: AuxiliaryWorkload
name: canary-demo
namespace: default
spec:
ports:
port: 8090
protocol: TCP
targetPort: 8090
selector:
app.oam.dev/component: canary-demo
type: NodePort
From the trait kruise-rollout
apiVersion: rollouts.kruise.io/v1alpha1
kind: Rollout
metadata:
annotations:
app.oam.dev/appAlias: ""
app.oam.dev/appName: canary-demo
app.oam.dev/deployVersion: ""
app.oam.dev/publishVersion: workflow-default-20221208071518401
app.oam.dev/workflowName: workflow-default
labels:
app.oam.dev/appName: canary-demo
app.oam.dev/appRevision: ""
app.oam.dev/component: canary-demo
app.oam.dev/name: canary-demo
app.oam.dev/namespace: default
app.oam.dev/resourceType: TRAIT
app.oam.dev/source-of-truth: from-velaux
trait.oam.dev/resource: rollout
trait.oam.dev/type: kruise-rollout
name: canary-demo
namespace: default
spec:
objectRef:
workloadRef:
apiVersion: apps/v1
kind: Deployment
name: canary-demo
strategy:
canary:
steps:
- pause: {}
weight: 20
- pause: {}
weight: 80
从velaUX上看
为什么是unhealthy,我是通过velaUX上创建的
Beta Was this translation helpful? Give feedback.
All reactions