kubevela / velaux

The KubeVela User Experience (UX) Platform
Apache License 2.0
138 stars 111 forks source link

webhook api bug #878

Open gtfaww opened 1 year ago

gtfaww commented 1 year ago

通过velaUX实现k8s资源交付,调取触发器接口更新K8S资源镜像时,发现工作流正常完成,但K8S资源未更新image。 应用版本记录发现发布后properties下多了一个image字段,而properties.objects下的K8S资源中的image未更新。 kubevela版本是1.9.2.

触发器接口模板: POST http://xxxxx:30000/api/v1/webhook/lvswhjxwq0omhzkv Content-Type: application/json

{
"action": "execute",
"upgrade": {
"demo-nginx": {
"image": "demo-nginx:1.2"
}
},
"codeInfo": {
"commit": "",
"branch": "",
"user": ""
}
}

正常版本配置: spec: components:

name: fp-gateway-dev properties: objects: apiVersion: apps/v1 kind: Deployment ...... image: demo-nginx:1.0 ...... 触发器调取后的配置 spec: components:

name: fp-gateway-dev properties: image: demo-nginx:1.2 objects: apiVersion: apps/v1 kind: Deployment ...... image: demo-nginx:1.0 ......

chivalryq commented 1 year ago

Yes for now the trigger will update the properties with literally image field. So if the component is k8s-objects type. It is not supported. Try webservice for trigger.