mirror of https://github.com/kubevela/kubevela.git
Fix: moves resource modification inside patch block (#6791)
CodeQL / Analyze (go) (push) Waiting to run
Details
Definition-Lint / definition-doc (push) Waiting to run
Details
E2E MultiCluster Test / detect-noop (push) Waiting to run
Details
E2E MultiCluster Test / e2e-multi-cluster-tests (v1.29) (push) Blocked by required conditions
Details
E2E Test / detect-noop (push) Waiting to run
Details
E2E Test / e2e-tests (v1.29) (push) Blocked by required conditions
Details
Go / detect-noop (push) Waiting to run
Details
Go / staticcheck (push) Blocked by required conditions
Details
Go / lint (push) Blocked by required conditions
Details
Go / check-diff (push) Blocked by required conditions
Details
Go / check-windows (push) Blocked by required conditions
Details
Go / check-core-image-build (push) Blocked by required conditions
Details
Go / check-cli-image-build (push) Blocked by required conditions
Details
license / Check for unapproved licenses (push) Waiting to run
Details
Registry / Build and Push Vela Images (push) Waiting to run
Details
Registry / Generate and Push Provenance to GCHR (${{ needs.publish-vela-images.outputs.vela_cli_digest }}, ${{ needs.publish-vela-images.outputs.vela_cli_image }}, Vela CLI Image) (push) Blocked by required conditions
Details
Registry / Generate and Push Provenance to GCHR (${{ needs.publish-vela-images.outputs.vela_core_digest }}, ${{ needs.publish-vela-images.outputs.vela_core_image }}, Vela Core Image) (push) Blocked by required conditions
Details
Registry / Generate and Push Provenance to DockerHub (${{ needs.publish-vela-images.outputs.vela_cli_digest }}, ${{ needs.publish-vela-images.outputs.vela_cli_dockerhub_image }}, Vela CLI Image) (push) Blocked by required conditions
Details
Registry / Generate and Push Provenance to DockerHub (${{ needs.publish-vela-images.outputs.vela_core_digest }}, ${{ needs.publish-vela-images.outputs.vela_core_dockerhub_image }}, Vela Core Image) (push) Blocked by required conditions
Details
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
Details
Sync SDK / sync_sdk (push) Waiting to run
Details
Unit-Test / detect-noop (push) Waiting to run
Details
Unit-Test / unit-tests (push) Blocked by required conditions
Details
CodeQL / Analyze (go) (push) Waiting to run
Details
Definition-Lint / definition-doc (push) Waiting to run
Details
E2E MultiCluster Test / detect-noop (push) Waiting to run
Details
E2E MultiCluster Test / e2e-multi-cluster-tests (v1.29) (push) Blocked by required conditions
Details
E2E Test / detect-noop (push) Waiting to run
Details
E2E Test / e2e-tests (v1.29) (push) Blocked by required conditions
Details
Go / detect-noop (push) Waiting to run
Details
Go / staticcheck (push) Blocked by required conditions
Details
Go / lint (push) Blocked by required conditions
Details
Go / check-diff (push) Blocked by required conditions
Details
Go / check-windows (push) Blocked by required conditions
Details
Go / check-core-image-build (push) Blocked by required conditions
Details
Go / check-cli-image-build (push) Blocked by required conditions
Details
license / Check for unapproved licenses (push) Waiting to run
Details
Registry / Build and Push Vela Images (push) Waiting to run
Details
Registry / Generate and Push Provenance to GCHR (${{ needs.publish-vela-images.outputs.vela_cli_digest }}, ${{ needs.publish-vela-images.outputs.vela_cli_image }}, Vela CLI Image) (push) Blocked by required conditions
Details
Registry / Generate and Push Provenance to GCHR (${{ needs.publish-vela-images.outputs.vela_core_digest }}, ${{ needs.publish-vela-images.outputs.vela_core_image }}, Vela Core Image) (push) Blocked by required conditions
Details
Registry / Generate and Push Provenance to DockerHub (${{ needs.publish-vela-images.outputs.vela_cli_digest }}, ${{ needs.publish-vela-images.outputs.vela_cli_dockerhub_image }}, Vela CLI Image) (push) Blocked by required conditions
Details
Registry / Generate and Push Provenance to DockerHub (${{ needs.publish-vela-images.outputs.vela_core_digest }}, ${{ needs.publish-vela-images.outputs.vela_core_dockerhub_image }}, Vela Core Image) (push) Blocked by required conditions
Details
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
Details
Sync SDK / sync_sdk (push) Waiting to run
Details
Unit-Test / detect-noop (push) Waiting to run
Details
Unit-Test / unit-tests (push) Blocked by required conditions
Details
* fix: moves resource modification inside patch block Signed-off-by: Ayush Shyam Kumar <ayushshyam.official.888@gmail.com> Signed-off-by: semmet95 <singhamitch@outlook.com> * chore: adds changes from make-reviewable Signed-off-by: Ayush Shyam Kumar <ayushshyam.official.888@gmail.com> Signed-off-by: semmet95 <singhamitch@outlook.com> * debugging error Signed-off-by: Ayush Shyam Kumar <ayushshyam.official.888@gmail.com> Signed-off-by: semmet95 <singhamitch@outlook.com> * test: updates the helm outdated path to new one Signed-off-by: Amit Singh <singhamitch@outlook.com> Signed-off-by: semmet95 <singhamitch@outlook.com> * tests: fixes the failing helm test case Signed-off-by: semmet95 <singhamitch@outlook.com> * removes debugging printing statements Signed-off-by: Amit Singh <singhamitch@outlook.com> Signed-off-by: semmet95 <singhamitch@outlook.com> --------- Signed-off-by: Ayush Shyam Kumar <ayushshyam.official.888@gmail.com> Signed-off-by: semmet95 <singhamitch@outlook.com> Signed-off-by: Amit Singh <singhamitch@outlook.com> Co-authored-by: Ayush <ayushshyam.official.888@gmail.com>
This commit is contained in:
parent
ad9cda63c9
commit
26123cf671
|
@ -17,49 +17,51 @@ spec:
|
|||
podDisruptive: true
|
||||
schematic:
|
||||
cue:
|
||||
template: |2
|
||||
let resourceContent = {
|
||||
resources: {
|
||||
if parameter.cpu != _|_ if parameter.memory != _|_ if parameter.requests == _|_ if parameter.limits == _|_ {
|
||||
// +patchStrategy=retainKeys
|
||||
requests: {
|
||||
cpu: parameter.cpu
|
||||
memory: parameter.memory
|
||||
template: |
|
||||
patch: {
|
||||
let resourceContent = {
|
||||
resources: {
|
||||
if parameter.cpu != _|_ if parameter.memory != _|_ if parameter.requests == _|_ if parameter.limits == _|_ {
|
||||
// +patchStrategy=retainKeys
|
||||
requests: {
|
||||
cpu: parameter.cpu
|
||||
memory: parameter.memory
|
||||
}
|
||||
// +patchStrategy=retainKeys
|
||||
limits: {
|
||||
cpu: parameter.cpu
|
||||
memory: parameter.memory
|
||||
}
|
||||
}
|
||||
// +patchStrategy=retainKeys
|
||||
limits: {
|
||||
cpu: parameter.cpu
|
||||
memory: parameter.memory
|
||||
}
|
||||
}
|
||||
|
||||
if parameter.requests != _|_ {
|
||||
// +patchStrategy=retainKeys
|
||||
requests: {
|
||||
cpu: parameter.requests.cpu
|
||||
memory: parameter.requests.memory
|
||||
if parameter.requests != _|_ {
|
||||
// +patchStrategy=retainKeys
|
||||
requests: {
|
||||
cpu: parameter.requests.cpu
|
||||
memory: parameter.requests.memory
|
||||
}
|
||||
}
|
||||
}
|
||||
if parameter.limits != _|_ {
|
||||
// +patchStrategy=retainKeys
|
||||
limits: {
|
||||
cpu: parameter.limits.cpu
|
||||
memory: parameter.limits.memory
|
||||
if parameter.limits != _|_ {
|
||||
// +patchStrategy=retainKeys
|
||||
limits: {
|
||||
cpu: parameter.limits.cpu
|
||||
memory: parameter.limits.memory
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if context.output.spec != _|_ if context.output.spec.template != _|_ {
|
||||
patch: spec: template: spec: {
|
||||
// +patchKey=name
|
||||
containers: [resourceContent]
|
||||
if context.output.spec != _|_ if context.output.spec.template != _|_ {
|
||||
spec: template: spec: {
|
||||
// +patchKey=name
|
||||
containers: [resourceContent]
|
||||
}
|
||||
}
|
||||
}
|
||||
if context.output.spec != _|_ if context.output.spec.jobTemplate != _|_ {
|
||||
patch: spec: jobTemplate: spec: template: spec: {
|
||||
// +patchKey=name
|
||||
containers: [resourceContent]
|
||||
if context.output.spec != _|_ if context.output.spec.jobTemplate != _|_ {
|
||||
spec: jobTemplate: spec: template: spec: {
|
||||
// +patchKey=name
|
||||
containers: [resourceContent]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -8,49 +8,50 @@ resource: {
|
|||
}
|
||||
}
|
||||
template: {
|
||||
patch: {
|
||||
let resourceContent = {
|
||||
resources: {
|
||||
if parameter.cpu != _|_ if parameter.memory != _|_ if parameter.requests == _|_ if parameter.limits == _|_ {
|
||||
// +patchStrategy=retainKeys
|
||||
requests: {
|
||||
cpu: parameter.cpu
|
||||
memory: parameter.memory
|
||||
}
|
||||
// +patchStrategy=retainKeys
|
||||
limits: {
|
||||
cpu: parameter.cpu
|
||||
memory: parameter.memory
|
||||
}
|
||||
}
|
||||
|
||||
let resourceContent = {
|
||||
resources: {
|
||||
if parameter.cpu != _|_ if parameter.memory != _|_ if parameter.requests == _|_ if parameter.limits == _|_ {
|
||||
// +patchStrategy=retainKeys
|
||||
requests: {
|
||||
cpu: parameter.cpu
|
||||
memory: parameter.memory
|
||||
if parameter.requests != _|_ {
|
||||
// +patchStrategy=retainKeys
|
||||
requests: {
|
||||
cpu: parameter.requests.cpu
|
||||
memory: parameter.requests.memory
|
||||
}
|
||||
}
|
||||
// +patchStrategy=retainKeys
|
||||
limits: {
|
||||
cpu: parameter.cpu
|
||||
memory: parameter.memory
|
||||
}
|
||||
}
|
||||
|
||||
if parameter.requests != _|_ {
|
||||
// +patchStrategy=retainKeys
|
||||
requests: {
|
||||
cpu: parameter.requests.cpu
|
||||
memory: parameter.requests.memory
|
||||
}
|
||||
}
|
||||
if parameter.limits != _|_ {
|
||||
// +patchStrategy=retainKeys
|
||||
limits: {
|
||||
cpu: parameter.limits.cpu
|
||||
memory: parameter.limits.memory
|
||||
if parameter.limits != _|_ {
|
||||
// +patchStrategy=retainKeys
|
||||
limits: {
|
||||
cpu: parameter.limits.cpu
|
||||
memory: parameter.limits.memory
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if context.output.spec != _|_ if context.output.spec.template != _|_ {
|
||||
patch: spec: template: spec: {
|
||||
// +patchKey=name
|
||||
containers: [resourceContent]
|
||||
if context.output.spec != _|_ if context.output.spec.template != _|_ {
|
||||
spec: template: spec: {
|
||||
// +patchKey=name
|
||||
containers: [resourceContent]
|
||||
}
|
||||
}
|
||||
}
|
||||
if context.output.spec != _|_ if context.output.spec.jobTemplate != _|_ {
|
||||
patch: spec: jobTemplate: spec: template: spec: {
|
||||
// +patchKey=name
|
||||
containers: [resourceContent]
|
||||
if context.output.spec != _|_ if context.output.spec.jobTemplate != _|_ {
|
||||
spec: jobTemplate: spec: template: spec: {
|
||||
// +patchKey=name
|
||||
containers: [resourceContent]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue