Skip to content

Commit

Permalink
[cilium] add patch
Browse files Browse the repository at this point in the history
Signed-off-by: Andrey Pavlov <[email protected]>
  • Loading branch information
AndreyPavlovFlant committed Aug 19, 2024
1 parent 9afcae7 commit 10264fd
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions patches/cilium-cli/004-tolerations.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
diff --git a/connectivity/check/deployment.go b/connectivity/check/deployment.go
index 128bf772..259f0205 100644
--- a/connectivity/check/deployment.go
+++ b/connectivity/check/deployment.go
@@ -120,6 +120,11 @@ func newDeployment(p deploymentParameters) *appsv1.Deployment {
if p.Replicas == 0 {
p.Replicas = 1
}
+ if p.Tolerations == nil || len(p.Tolerations) == 0 {
+ p.Tolerations = []corev1.Toleration{
+ {Operator: corev1.TolerationOpExists},
+ }
+ }
replicas32 := int32(p.Replicas)
dep := &appsv1.Deployment{
ObjectMeta: metav1.ObjectMeta{
@@ -243,6 +248,11 @@ type daemonSetParameters struct {
}

func newDaemonSet(p daemonSetParameters) *appsv1.DaemonSet {
+ if p.Tolerations == nil || len(p.Tolerations) == 0 {
+ p.Tolerations = []corev1.Toleration{
+ {Operator: corev1.TolerationOpExists},
+ }
+ }
ds := &appsv1.DaemonSet{
ObjectMeta: metav1.ObjectMeta{
Name: p.Name,

0 comments on commit 10264fd

Please sign in to comment.