From ea0003f7cb46e71f0e7a5feae8640771e962e4db Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 27 Apr 2022 14:19:43 +0800 Subject: [PATCH] Fix: fix revision in webservice (#3766) Signed-off-by: FogDong (cherry picked from commit 1ab13437b46c912547a18f61f6899c0e46c6dbd4) Co-authored-by: FogDong --- charts/vela-core/templates/defwithtemplate/webservice.yaml | 5 ++--- .../vela-minimal/templates/defwithtemplate/webservice.yaml | 5 ++--- vela-templates/definitions/internal/component/webservice.cue | 5 ++--- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/charts/vela-core/templates/defwithtemplate/webservice.yaml b/charts/vela-core/templates/defwithtemplate/webservice.yaml index 344391d8b..bfaea3c6e 100644 --- a/charts/vela-core/templates/defwithtemplate/webservice.yaml +++ b/charts/vela-core/templates/defwithtemplate/webservice.yaml @@ -132,10 +132,9 @@ spec: parameter.labels } if parameter.addRevisionLabel { - "app.oam.dev/appRevision": context.appRevision + "app.oam.dev/revision": context.revision } "app.oam.dev/component": context.name - "app.oam.dev/revision": context.revision } if parameter.annotations != _|_ { annotations: parameter.annotations @@ -333,7 +332,7 @@ spec: exposeType: *"ClusterIP" | "NodePort" | "LoadBalancer" | "ExternalName" // +ignore - // +usage=If addRevisionLabel is true, the appRevision label will be added to the underlying pods + // +usage=If addRevisionLabel is true, the revision label will be added to the underlying pods addRevisionLabel: *false | bool // +usage=Commands to run in the container diff --git a/charts/vela-minimal/templates/defwithtemplate/webservice.yaml b/charts/vela-minimal/templates/defwithtemplate/webservice.yaml index 344391d8b..bfaea3c6e 100644 --- a/charts/vela-minimal/templates/defwithtemplate/webservice.yaml +++ b/charts/vela-minimal/templates/defwithtemplate/webservice.yaml @@ -132,10 +132,9 @@ spec: parameter.labels } if parameter.addRevisionLabel { - "app.oam.dev/appRevision": context.appRevision + "app.oam.dev/revision": context.revision } "app.oam.dev/component": context.name - "app.oam.dev/revision": context.revision } if parameter.annotations != _|_ { annotations: parameter.annotations @@ -333,7 +332,7 @@ spec: exposeType: *"ClusterIP" | "NodePort" | "LoadBalancer" | "ExternalName" // +ignore - // +usage=If addRevisionLabel is true, the appRevision label will be added to the underlying pods + // +usage=If addRevisionLabel is true, the revision label will be added to the underlying pods addRevisionLabel: *false | bool // +usage=Commands to run in the container diff --git a/vela-templates/definitions/internal/component/webservice.cue b/vela-templates/definitions/internal/component/webservice.cue index 2b1a0ab46..60627d8b5 100644 --- a/vela-templates/definitions/internal/component/webservice.cue +++ b/vela-templates/definitions/internal/component/webservice.cue @@ -175,10 +175,9 @@ template: { parameter.labels } if parameter.addRevisionLabel { - "app.oam.dev/appRevision": context.appRevision + "app.oam.dev/revision": context.revision } "app.oam.dev/component": context.name - "app.oam.dev/revision": context.revision } if parameter.annotations != _|_ { annotations: parameter.annotations @@ -379,7 +378,7 @@ template: { exposeType: *"ClusterIP" | "NodePort" | "LoadBalancer" | "ExternalName" // +ignore - // +usage=If addRevisionLabel is true, the appRevision label will be added to the underlying pods + // +usage=If addRevisionLabel is true, the revision label will be added to the underlying pods addRevisionLabel: *false | bool // +usage=Commands to run in the container