Skip to content

Commit

Permalink
Merge pull request #2179 from rene-dekker/automated-cherry-pick-of-#2…
Browse files Browse the repository at this point in the history
…124-origin-release-v1.28

Automated cherry pick of #2124: Set the csi-node-driver priority class to
  • Loading branch information
marvin-tigera committed Sep 19, 2022
2 parents 84e794f + 5a78ad0 commit 2ee2310
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/render/csi.go
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,8 @@ func (c *csiComponent) csiDaemonset() *appsv1.DaemonSet {
Template: c.csiTemplate(),
}

setNodeCriticalPod(&(dsSpec.Template))

return &appsv1.DaemonSet{
TypeMeta: typeMeta,
ObjectMeta: dsMeta,
Expand Down
9 changes: 9 additions & 0 deletions pkg/render/csi_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ package render_test
import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"

appsv1 "k8s.io/api/apps/v1"

operatorv1 "github.com/tigera/operator/api/v1"
"github.com/tigera/operator/pkg/common"
"github.com/tigera/operator/pkg/render"
Expand Down Expand Up @@ -82,4 +85,10 @@ var _ = Describe("CSI rendering tests", func() {
rtest.ExpectResource(delObjs[i], expectedRes.name, expectedRes.ns, expectedRes.group, expectedRes.version, expectedRes.kind)
}
})

It("should set priority class to system-node-critical", func() {
resources, _ := render.CSI(&cfg).Objects()
ds := rtest.GetResource(resources, render.CSIDaemonSetName, common.CalicoNamespace, "apps", "v1", "DaemonSet").(*appsv1.DaemonSet)
Expect(ds.Spec.Template.Spec.PriorityClassName).To(Equal("system-node-critical"))
})
})

0 comments on commit 2ee2310

Please sign in to comment.