From 088da37063307a157ad1152fb6f65d78f30c4222 Mon Sep 17 00:00:00 2001 From: Ray Wainman Date: Thu, 14 Nov 2024 16:00:00 +0000 Subject: [PATCH 1/2] change default lease name for vpa-recommender to "vpa-recommender-lease" --- vertical-pod-autoscaler/pkg/recommender/main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vertical-pod-autoscaler/pkg/recommender/main.go b/vertical-pod-autoscaler/pkg/recommender/main.go index afa7c1629375..519870088fff 100644 --- a/vertical-pod-autoscaler/pkg/recommender/main.go +++ b/vertical-pod-autoscaler/pkg/recommender/main.go @@ -187,7 +187,8 @@ func defaultLeaderElectionConfiguration() componentbaseconfig.LeaderElectionConf RenewDeadline: metav1.Duration{Duration: defaultRenewDeadline}, RetryPeriod: metav1.Duration{Duration: defaultRetryPeriod}, ResourceLock: resourcelock.LeasesResourceLock, - ResourceName: "vpa-recommender", + // This was changed from "vpa-recommender" to avoid conflicts with managed VPA deployments. + ResourceName: "vpa-recommender-lease", ResourceNamespace: metav1.NamespaceSystem, } } From a6ddc247ee5d05032e32713596eb9d122888a850 Mon Sep 17 00:00:00 2001 From: Ray Wainman Date: Thu, 14 Nov 2024 16:29:22 +0000 Subject: [PATCH 2/2] update format --- vertical-pod-autoscaler/pkg/recommender/main.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/vertical-pod-autoscaler/pkg/recommender/main.go b/vertical-pod-autoscaler/pkg/recommender/main.go index 519870088fff..2b6b79b9a602 100644 --- a/vertical-pod-autoscaler/pkg/recommender/main.go +++ b/vertical-pod-autoscaler/pkg/recommender/main.go @@ -182,11 +182,11 @@ const ( func defaultLeaderElectionConfiguration() componentbaseconfig.LeaderElectionConfiguration { return componentbaseconfig.LeaderElectionConfiguration{ - LeaderElect: false, - LeaseDuration: metav1.Duration{Duration: defaultLeaseDuration}, - RenewDeadline: metav1.Duration{Duration: defaultRenewDeadline}, - RetryPeriod: metav1.Duration{Duration: defaultRetryPeriod}, - ResourceLock: resourcelock.LeasesResourceLock, + LeaderElect: false, + LeaseDuration: metav1.Duration{Duration: defaultLeaseDuration}, + RenewDeadline: metav1.Duration{Duration: defaultRenewDeadline}, + RetryPeriod: metav1.Duration{Duration: defaultRetryPeriod}, + ResourceLock: resourcelock.LeasesResourceLock, // This was changed from "vpa-recommender" to avoid conflicts with managed VPA deployments. ResourceName: "vpa-recommender-lease", ResourceNamespace: metav1.NamespaceSystem,