Skip to content

Commit 4466069

Browse files
authored
feat: first backport of April (#1282)
2 parents 4a40038 + fb4a734 commit 4466069

File tree

14 files changed

+1597
-1
lines changed

14 files changed

+1597
-1
lines changed

cmd/hubagent/options/options_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -729,6 +729,7 @@ func TestWebhookOptions(t *testing.T) {
729729
GuardRailWhitelistedUsers: "",
730730
GuardRailDenyModifyMemberClusterLabels: false,
731731
EnableWorkload: false,
732+
EnablePDBs: true,
732733
UseCertManager: false,
733734
},
734735
},
@@ -753,6 +754,7 @@ func TestWebhookOptions(t *testing.T) {
753754
GuardRailWhitelistedUsers: "user1,user2",
754755
GuardRailDenyModifyMemberClusterLabels: true,
755756
EnableWorkload: true,
757+
EnablePDBs: true,
756758
UseCertManager: true,
757759
},
758760
},
@@ -768,6 +770,7 @@ func TestWebhookOptions(t *testing.T) {
768770
GuardRailWhitelistedUsers: "",
769771
GuardRailDenyModifyMemberClusterLabels: false,
770772
EnableWorkload: false,
773+
EnablePDBs: true,
771774
UseCertManager: false,
772775
},
773776
},
@@ -783,6 +786,7 @@ func TestWebhookOptions(t *testing.T) {
783786
GuardRailWhitelistedUsers: "",
784787
GuardRailDenyModifyMemberClusterLabels: false,
785788
EnableWorkload: false,
789+
EnablePDBs: true,
786790
UseCertManager: false,
787791
},
788792
},

cmd/hubagent/options/webhooks.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@ func (o *WebhookOptions) AddFlags(flags *flag.FlagSet) {
120120
flags.BoolVar(
121121
&o.EnablePDBs,
122122
"enable-pdbs",
123-
false,
123+
// TO-DO (chenyu1): use the true value for compatibility reasons; this will be set to false in a later release.
124+
true,
124125
"Enable PodDisruptionBudgets to be created directly in the hub cluster or not. If set to true, the KubeFleet PodDisruptionBudget validating webhook, which blocks the creation of PodDisruptionBudgets outside KubeFleet reserved namespaces, will be disabled. This option only applies if webhooks are enabled.",
125126
)
126127

0 commit comments

Comments
 (0)