From 6b8a8a191ca80cd689c16e6ab07f20f541d4ea11 Mon Sep 17 00:00:00 2001 From: kingram Date: Wed, 2 Mar 2022 10:14:14 +0800 Subject: [PATCH] fix: update readyReplicas type Signed-off-by: kingram --- charts/vela-core/templates/defwithtemplate/webservice.yaml | 6 +++--- charts/vela-core/templates/defwithtemplate/worker.yaml | 6 +++--- .../vela-minimal/templates/defwithtemplate/webservice.yaml | 6 +++--- charts/vela-minimal/templates/defwithtemplate/worker.yaml | 6 +++--- .../definitions/internal/component/webservice.cue | 6 +++--- vela-templates/definitions/internal/component/worker.cue | 6 +++--- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/charts/vela-core/templates/defwithtemplate/webservice.yaml b/charts/vela-core/templates/defwithtemplate/webservice.yaml index bde7d258e..a3d09e513 100644 --- a/charts/vela-core/templates/defwithtemplate/webservice.yaml +++ b/charts/vela-core/templates/defwithtemplate/webservice.yaml @@ -506,15 +506,15 @@ spec: import "strconv" ready: { if context.output.status.readyReplicas == _|_ { - readyReplicas: "0" + readyReplicas: 0 } if context.output.status.readyReplicas != _|_ { - readyReplicas: strconv.FormatInt(context.output.status.readyReplicas, 10) + readyReplicas: context.output.status.readyReplicas } } - message: "Ready:" + ready.readyReplicas + "/" + strconv.FormatInt(context.output.spec.replicas, 10) + message: "Ready:" + strconv.FormatInt(ready.readyReplicas, 10) + "/" + strconv.FormatInt(context.output.spec.replicas, 10) healthPolicy: |- ready: { if context.output.status.updatedReplicas == _|_ { diff --git a/charts/vela-core/templates/defwithtemplate/worker.yaml b/charts/vela-core/templates/defwithtemplate/worker.yaml index a545c580d..3e0c2077e 100644 --- a/charts/vela-core/templates/defwithtemplate/worker.yaml +++ b/charts/vela-core/templates/defwithtemplate/worker.yaml @@ -399,15 +399,15 @@ spec: import "strconv" ready: { if context.output.status.readyReplicas == _|_ { - readyReplicas: "0" + readyReplicas: 0 } if context.output.status.readyReplicas != _|_ { - readyReplicas: strconv.FormatInt(context.output.status.readyReplicas, 10) + readyReplicas: context.output.status.readyReplicas } } - message: "Ready:" + ready.readyReplicas + "/" + strconv.FormatInt(context.output.spec.replicas, 10) + message: "Ready:" + strconv.FormatInt(ready.readyReplicas, 10) + "/" + strconv.FormatInt(context.output.spec.replicas, 10) healthPolicy: |- ready: { if context.output.status.updatedReplicas == _|_ { diff --git a/charts/vela-minimal/templates/defwithtemplate/webservice.yaml b/charts/vela-minimal/templates/defwithtemplate/webservice.yaml index bde7d258e..a3d09e513 100644 --- a/charts/vela-minimal/templates/defwithtemplate/webservice.yaml +++ b/charts/vela-minimal/templates/defwithtemplate/webservice.yaml @@ -506,15 +506,15 @@ spec: import "strconv" ready: { if context.output.status.readyReplicas == _|_ { - readyReplicas: "0" + readyReplicas: 0 } if context.output.status.readyReplicas != _|_ { - readyReplicas: strconv.FormatInt(context.output.status.readyReplicas, 10) + readyReplicas: context.output.status.readyReplicas } } - message: "Ready:" + ready.readyReplicas + "/" + strconv.FormatInt(context.output.spec.replicas, 10) + message: "Ready:" + strconv.FormatInt(ready.readyReplicas, 10) + "/" + strconv.FormatInt(context.output.spec.replicas, 10) healthPolicy: |- ready: { if context.output.status.updatedReplicas == _|_ { diff --git a/charts/vela-minimal/templates/defwithtemplate/worker.yaml b/charts/vela-minimal/templates/defwithtemplate/worker.yaml index a545c580d..3e0c2077e 100644 --- a/charts/vela-minimal/templates/defwithtemplate/worker.yaml +++ b/charts/vela-minimal/templates/defwithtemplate/worker.yaml @@ -399,15 +399,15 @@ spec: import "strconv" ready: { if context.output.status.readyReplicas == _|_ { - readyReplicas: "0" + readyReplicas: 0 } if context.output.status.readyReplicas != _|_ { - readyReplicas: strconv.FormatInt(context.output.status.readyReplicas, 10) + readyReplicas: context.output.status.readyReplicas } } - message: "Ready:" + ready.readyReplicas + "/" + strconv.FormatInt(context.output.spec.replicas, 10) + message: "Ready:" + strconv.FormatInt(ready.readyReplicas, 10) + "/" + strconv.FormatInt(context.output.spec.replicas, 10) healthPolicy: |- ready: { if context.output.status.updatedReplicas == _|_ { diff --git a/vela-templates/definitions/internal/component/webservice.cue b/vela-templates/definitions/internal/component/webservice.cue index c23fb2ec1..b7099b4f6 100644 --- a/vela-templates/definitions/internal/component/webservice.cue +++ b/vela-templates/definitions/internal/component/webservice.cue @@ -20,15 +20,15 @@ webservice: { import "strconv" ready: { if context.output.status.readyReplicas == _|_ { - readyReplicas: "0" + readyReplicas: 0 } if context.output.status.readyReplicas != _|_ { - readyReplicas: strconv.FormatInt(context.output.status.readyReplicas, 10) + readyReplicas: context.output.status.readyReplicas } } - message: "Ready:" + ready.readyReplicas + "/" + strconv.FormatInt(context.output.spec.replicas, 10) + message: "Ready:" + strconv.FormatInt(ready.readyReplicas, 10) + "/" + strconv.FormatInt(context.output.spec.replicas, 10) """# healthPolicy: #""" ready: { diff --git a/vela-templates/definitions/internal/component/worker.cue b/vela-templates/definitions/internal/component/worker.cue index b52ba56b9..9ab7bf5f8 100644 --- a/vela-templates/definitions/internal/component/worker.cue +++ b/vela-templates/definitions/internal/component/worker.cue @@ -18,15 +18,15 @@ worker: { import "strconv" ready: { if context.output.status.readyReplicas == _|_ { - readyReplicas: "0" + readyReplicas: 0 } if context.output.status.readyReplicas != _|_ { - readyReplicas: strconv.FormatInt(context.output.status.readyReplicas, 10) + readyReplicas: context.output.status.readyReplicas } } - message: "Ready:" + ready.readyReplicas + "/" + strconv.FormatInt(context.output.spec.replicas, 10) + message: "Ready:" + strconv.FormatInt(ready.readyReplicas, 10) + "/" + strconv.FormatInt(context.output.spec.replicas, 10) """# healthPolicy: #""" ready: {