diff --git a/charts/vela-core/templates/defwithtemplate/webservice.yaml b/charts/vela-core/templates/defwithtemplate/webservice.yaml index 3237ebf45..be7b5b3bc 100644 --- a/charts/vela-core/templates/defwithtemplate/webservice.yaml +++ b/charts/vela-core/templates/defwithtemplate/webservice.yaml @@ -306,6 +306,9 @@ spec: if v.name == _|_ { name: "port-" + strconv.FormatInt(v.port, 10) } + if v.nodePort != _|_ && parameter.exposeType == "NodePort" { + nodePort: v.nodePort + } }, ] outputs: { @@ -354,6 +357,8 @@ spec: protocol: *"TCP" | "UDP" | "SCTP" // +usage=Specify if the port should be exposed expose: *false | bool + // +usage=exposed node port. Only Valid when exposeType is NodePort + nodePort?: int }] // +ignore diff --git a/charts/vela-minimal/templates/defwithtemplate/webservice.yaml b/charts/vela-minimal/templates/defwithtemplate/webservice.yaml index 3237ebf45..be7b5b3bc 100644 --- a/charts/vela-minimal/templates/defwithtemplate/webservice.yaml +++ b/charts/vela-minimal/templates/defwithtemplate/webservice.yaml @@ -306,6 +306,9 @@ spec: if v.name == _|_ { name: "port-" + strconv.FormatInt(v.port, 10) } + if v.nodePort != _|_ && parameter.exposeType == "NodePort" { + nodePort: v.nodePort + } }, ] outputs: { @@ -354,6 +357,8 @@ spec: protocol: *"TCP" | "UDP" | "SCTP" // +usage=Specify if the port should be exposed expose: *false | bool + // +usage=exposed node port. Only Valid when exposeType is NodePort + nodePort?: int }] // +ignore diff --git a/vela-templates/definitions/internal/component/webservice.cue b/vela-templates/definitions/internal/component/webservice.cue index c184cdded..0e24438ac 100644 --- a/vela-templates/definitions/internal/component/webservice.cue +++ b/vela-templates/definitions/internal/component/webservice.cue @@ -351,6 +351,9 @@ template: { if v.name == _|_ { name: "port-" + strconv.FormatInt(v.port, 10) } + if v.nodePort != _|_ && parameter.exposeType == "NodePort" { + nodePort: v.nodePort + } }, ] @@ -401,6 +404,8 @@ template: { protocol: *"TCP" | "UDP" | "SCTP" // +usage=Specify if the port should be exposed expose: *false | bool + // +usage=exposed node port. Only Valid when exposeType is NodePort + nodePort?: int }] // +ignore