From 4e370b940cbb4397b4059220e46471759fc72383 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 2 Aug 2022 23:10:12 +0800 Subject: [PATCH] Fix: sidecar trait (#4543) Signed-off-by: qiaozp (cherry picked from commit 3eaf2dd02ac51f6d6a75a67e7d0b7c636c734497) Co-authored-by: qiaozp --- .../vela-core/templates/defwithtemplate/sidecar.yaml | 11 +++++------ .../templates/defwithtemplate/sidecar.yaml | 11 +++++------ vela-templates/definitions/internal/trait/sidecar.cue | 4 +--- 3 files changed, 11 insertions(+), 15 deletions(-) diff --git a/charts/vela-core/templates/defwithtemplate/sidecar.yaml b/charts/vela-core/templates/defwithtemplate/sidecar.yaml index e44d472bf..bd52fff4a 100644 --- a/charts/vela-core/templates/defwithtemplate/sidecar.yaml +++ b/charts/vela-core/templates/defwithtemplate/sidecar.yaml @@ -10,12 +10,11 @@ metadata: name: sidecar namespace: {{ include "systemDefinitionNamespace" . }} spec: - attributes: - appliesToWorkloads: - - deployments.apps - - statefulsets.apps - - daemonsets.apps - - jobs.batch + appliesToWorkloads: + - deployments.apps + - statefulsets.apps + - daemonsets.apps + - jobs.batch podDisruptive: true schematic: cue: diff --git a/charts/vela-minimal/templates/defwithtemplate/sidecar.yaml b/charts/vela-minimal/templates/defwithtemplate/sidecar.yaml index e44d472bf..bd52fff4a 100644 --- a/charts/vela-minimal/templates/defwithtemplate/sidecar.yaml +++ b/charts/vela-minimal/templates/defwithtemplate/sidecar.yaml @@ -10,12 +10,11 @@ metadata: name: sidecar namespace: {{ include "systemDefinitionNamespace" . }} spec: - attributes: - appliesToWorkloads: - - deployments.apps - - statefulsets.apps - - daemonsets.apps - - jobs.batch + appliesToWorkloads: + - deployments.apps + - statefulsets.apps + - daemonsets.apps + - jobs.batch podDisruptive: true schematic: cue: diff --git a/vela-templates/definitions/internal/trait/sidecar.cue b/vela-templates/definitions/internal/trait/sidecar.cue index 3579c7931..4a6e755fd 100644 --- a/vela-templates/definitions/internal/trait/sidecar.cue +++ b/vela-templates/definitions/internal/trait/sidecar.cue @@ -7,9 +7,7 @@ sidecar: { description: "Inject a sidecar container to K8s pod for your workload which follows the pod spec in path 'spec.template'." attributes: { podDisruptive: true - attributes: { - appliesToWorkloads: ["deployments.apps", "statefulsets.apps", "daemonsets.apps", "jobs.batch"] - } + appliesToWorkloads: ["deployments.apps", "statefulsets.apps", "daemonsets.apps", "jobs.batch"] } } template: {