From 9409bb15da4d7d926a60758855fd60bd45149589 Mon Sep 17 00:00:00 2001 From: k8s-infra-cherrypick-robot <90416843+k8s-infra-cherrypick-robot@users.noreply.github.com> Date: Sun, 2 Jun 2024 13:27:35 -0700 Subject: [PATCH] Rename variable to fix typo (#11413) Co-authored-by: Andrea Scarpino --- internal/ingress/controller/config/config.go | 6 +++--- internal/ingress/controller/template/template.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/ingress/controller/config/config.go b/internal/ingress/controller/config/config.go index bad82b8b0..3098f5cba 100644 --- a/internal/ingress/controller/config/config.go +++ b/internal/ingress/controller/config/config.go @@ -734,9 +734,9 @@ type Configuration struct { // simultaneous connections. GlobalRateLimitMemcachedPoolSize int `json:"global-rate-limit-memcached-pool-size"` - // GlobalRateLimitStatucCode determines the HTTP status code to return + // GlobalRateLimitStatusCode determines the HTTP status code to return // when limit is exceeding during global rate limiting. - GlobalRateLimitStatucCode int `json:"global-rate-limit-status-code"` + GlobalRateLimitStatusCode int `json:"global-rate-limit-status-code"` // DebugConnections Enables debugging log for selected client connections // http://nginx.org/en/docs/ngx_core_module.html#debug_connection @@ -909,7 +909,7 @@ func NewDefault() Configuration { GlobalRateLimitMemcachedConnectTimeout: 50, GlobalRateLimitMemcachedMaxIdleTimeout: 10000, GlobalRateLimitMemcachedPoolSize: 50, - GlobalRateLimitStatucCode: 429, + GlobalRateLimitStatusCode: 429, DebugConnections: []string{}, StrictValidatePathType: false, // TODO: This will be true in future releases } diff --git a/internal/ingress/controller/template/template.go b/internal/ingress/controller/template/template.go index 7cd6a0604..c70406cf0 100644 --- a/internal/ingress/controller/template/template.go +++ b/internal/ingress/controller/template/template.go @@ -413,7 +413,7 @@ func configForLua(input interface{}) string { all.Cfg.GlobalRateLimitMemcachedConnectTimeout, all.Cfg.GlobalRateLimitMemcachedMaxIdleTimeout, all.Cfg.GlobalRateLimitMemcachedPoolSize, - all.Cfg.GlobalRateLimitStatucCode, + all.Cfg.GlobalRateLimitStatusCode, ) }