Skip to content

Commit 091f15f

Browse files
authored
Disable client-side rate limiting by default (#610)
1 parent b5ae625 commit 091f15f

File tree

9 files changed

+3
-45
lines changed

9 files changed

+3
-45
lines changed

pkg/apis/config/v1alpha1/defaults.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,6 @@ func SetDefaults_SharderConfig(obj *SharderConfig) {
5050
}
5151
}
5252

53-
func SetDefaults_ClientConnectionConfiguration(obj *componentbaseconfigv1alpha1.ClientConnectionConfiguration) {
54-
// increase default rate limiter settings to make sharder and controller more responsive
55-
if obj.QPS == 0 {
56-
obj.QPS = 100
57-
}
58-
if obj.Burst == 0 {
59-
obj.Burst = 150
60-
}
61-
}
62-
6353
func SetDefaults_LeaderElectionConfiguration(obj *componentbaseconfigv1alpha1.LeaderElectionConfiguration) {
6454
if obj.ResourceLock == "" {
6555
obj.ResourceLock = resourcelock.LeasesResourceLock

pkg/apis/config/v1alpha1/defaults_test.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,10 @@ var _ = Describe("SharderConfig defaulting", func() {
3737
})
3838

3939
Context("ClientConnectionConfiguration", func() {
40-
It("should set default values", func() {
40+
It("should not set any default values", func() {
4141
SetObjectDefaults_SharderConfig(obj)
4242

43-
Expect(obj.ClientConnection).To(Equal(&componentbaseconfigv1alpha1.ClientConnectionConfiguration{
44-
QPS: 100,
45-
Burst: 150,
46-
}))
43+
Expect(obj.ClientConnection).To(Equal(&componentbaseconfigv1alpha1.ClientConnectionConfiguration{}))
4744
})
4845
})
4946

pkg/apis/config/v1alpha1/zz_generated.defaults.go

Lines changed: 0 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/e2e/e2e_suite_test.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,6 @@ var _ = BeforeSuite(func() {
7070

7171
restConfig, err := config.GetConfig()
7272
Expect(err).NotTo(HaveOccurred())
73-
// gotta go fast during tests
74-
restConfig.QPS = 100
75-
restConfig.Burst = 150
7673

7774
scheme := runtime.NewScheme()
7875
schemeBuilder := runtime.NewSchemeBuilder(

webhosting-operator/cmd/experiment/main.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,8 @@ func main() {
9090
log.Error(err, "Failed to set GOMAXPROCS")
9191
}
9292

93-
restConfig := ctrl.GetConfigOrDie()
94-
restConfig.QPS = 1000
95-
restConfig.Burst = 1200
96-
9793
var err error
98-
mgr, err = ctrl.NewManager(restConfig, ctrl.Options{
94+
mgr, err = ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{
9995
Scheme: scheme,
10096
HealthProbeBindAddress: ":8081",
10197
Metrics: metricsserver.Options{

webhosting-operator/config/manager/with-dns/config.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
apiVersion: config.webhosting.timebertt.dev/v1alpha1
22
kind: WebhostingOperatorConfig
3-
clientConnection:
4-
qps: 800
5-
burst: 1000
63
ingress:
74
hosts:
85
- webhosting.timebertt.dev

webhosting-operator/pkg/apis/config/v1alpha1/defaults.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,6 @@ func SetDefaults_WebhostingOperatorConfig(obj *WebhostingOperatorConfig) {
4949
}
5050
}
5151

52-
func SetDefaults_ClientConnectionConfiguration(obj *componentbaseconfigv1alpha1.ClientConnectionConfiguration) {
53-
// increase default rate limiter settings to make sharder and controller more responsive
54-
if obj.QPS == 0 {
55-
obj.QPS = 100
56-
}
57-
if obj.Burst == 0 {
58-
obj.Burst = 150
59-
}
60-
}
61-
6252
func SetDefaults_LeaderElectionConfiguration(obj *componentbaseconfigv1alpha1.LeaderElectionConfiguration) {
6353
if obj.ResourceLock == "" {
6454
obj.ResourceLock = resourcelock.LeasesResourceLock

webhosting-operator/pkg/apis/config/v1alpha1/zz_generated.defaults.go

Lines changed: 0 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webhosting-operator/test/e2e/e2e_suite_test.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,6 @@ var _ = BeforeSuite(func() {
6868

6969
restConfig, err := config.GetConfig()
7070
Expect(err).NotTo(HaveOccurred())
71-
// gotta go fast during tests
72-
restConfig.QPS = 100
73-
restConfig.Burst = 150
7471

7572
scheme := runtime.NewScheme()
7673
schemeBuilder := runtime.NewSchemeBuilder(

0 commit comments

Comments
 (0)