From 6c916061809380660c9b573c8f91038f63472929 Mon Sep 17 00:00:00 2001 From: harsha-mangena Date: Fri, 21 Jun 2024 11:50:41 -0400 Subject: [PATCH 1/9] - refer https://github.com/nginxinc/kubernetes-ingress/issues/5776 - commented deprecated include-year and IncludeYear --- charts/nginx-ingress/templates/_helpers.tpl | 1 - charts/nginx-ingress/values.schema.json | 20 +++++++++---------- charts/nginx-ingress/values.yaml | 2 +- cmd/nginx-ingress/flags.go | 13 ++++++------ .../command-line-arguments.md | 6 +++--- docs/content/releases.md | 2 +- 6 files changed, 21 insertions(+), 23 deletions(-) diff --git a/charts/nginx-ingress/templates/_helpers.tpl b/charts/nginx-ingress/templates/_helpers.tpl index 051cd17b0d..301c64d51e 100644 --- a/charts/nginx-ingress/templates/_helpers.tpl +++ b/charts/nginx-ingress/templates/_helpers.tpl @@ -277,7 +277,6 @@ Build the args for the service binary. - -service-insight-tls-secret={{ .Values.serviceInsight.secret }} - -enable-custom-resources={{ .Values.controller.enableCustomResources }} - -enable-snippets={{ .Values.controller.enableSnippets }} -- -include-year={{ .Values.controller.includeYear }} - -disable-ipv6={{ .Values.controller.disableIPV6 }} {{- if .Values.controller.enableCustomResources }} - -enable-tls-passthrough={{ .Values.controller.enableTLSPassthrough }} diff --git a/charts/nginx-ingress/values.schema.json b/charts/nginx-ingress/values.schema.json index 2b344695a2..5ea9ec5301 100644 --- a/charts/nginx-ingress/values.schema.json +++ b/charts/nginx-ingress/values.schema.json @@ -908,14 +908,14 @@ false ] }, - "includeYear": { - "type": "boolean", - "default": false, - "title": "The includeYear", - "examples": [ - false - ] - }, + // "includeYear": { + // "type": "boolean", + // "default": false, + // "title": "The includeYear", + // "examples": [ + // false + // ] + // }, "enableTLSPassthrough": { "type": "boolean", "default": false, @@ -1728,7 +1728,7 @@ "watchNamespace": "", "enableCustomResources": true, "enableOIDC": false, - "includeYear": false, + // "includeYear": false, "enableTLSPassthrough": false, "tlsPassthroughPort": 443, "enableCertManager": false, @@ -2262,7 +2262,7 @@ "watchNamespace": "", "enableCustomResources": true, "enableOIDC": false, - "includeYear": false, + // "includeYear": false, "enableTLSPassthrough": false, "enableCertManager": false, "enableExternalDNS": false, diff --git a/charts/nginx-ingress/values.yaml b/charts/nginx-ingress/values.yaml index f7201bb285..6fbca419eb 100644 --- a/charts/nginx-ingress/values.yaml +++ b/charts/nginx-ingress/values.yaml @@ -344,7 +344,7 @@ controller: enableOIDC: false ## Include year in log header. This parameter will be removed in release 3.7 and the year will be included by default. - includeYear: false + # includeYear: false ## Enable TLS Passthrough on port 443. Requires controller.enableCustomResources. enableTLSPassthrough: false diff --git a/cmd/nginx-ingress/flags.go b/cmd/nginx-ingress/flags.go index d36381974e..c90ab55f8b 100644 --- a/cmd/nginx-ingress/flags.go +++ b/cmd/nginx-ingress/flags.go @@ -6,7 +6,6 @@ import ( "net" "os" "regexp" - "strconv" "strings" "github.com/golang/glog" @@ -198,8 +197,8 @@ var ( enableExternalDNS = flag.Bool("enable-external-dns", false, "Enable external-dns controller for VirtualServer resources. Requires -enable-custom-resources") - includeYearInLogs = flag.Bool("include-year", false, - "Option to include the year in the log header") + // includeYearInLogs = flag.Bool("includeYear", false, + // "Option to include the year in the log header") disableIPV6 = flag.Bool("disable-ipv6", false, `Disable IPV6 listeners explicitly for nodes that do not support the IPV6 stack`) @@ -305,10 +304,10 @@ func initialChecks() { glog.Fatalf("Error setting logtostderr to true: %v", err) } - err = flag.Lookup("include_year").Value.Set(strconv.FormatBool(*includeYearInLogs)) - if err != nil { - glog.Fatalf("Error setting include_year flag: %v", err) - } + // err = flag.Lookup("include_year").Value.Set(strconv.FormatBool(*includeYearInLogs)) + // if err != nil { + // glog.Fatalf("Error setting include_year flag: %v", err) + // } if startupCheckFn != nil { err := startupCheckFn() diff --git a/docs/content/configuration/global-configuration/command-line-arguments.md b/docs/content/configuration/global-configuration/command-line-arguments.md index 377ea9ea6b..f08760c147 100644 --- a/docs/content/configuration/global-configuration/command-line-arguments.md +++ b/docs/content/configuration/global-configuration/command-line-arguments.md @@ -81,13 +81,13 @@ Default `false`. --- -### -include-year + --- diff --git a/docs/content/releases.md b/docs/content/releases.md index c8948259db..60d74f9dfc 100644 --- a/docs/content/releases.md +++ b/docs/content/releases.md @@ -744,7 +744,7 @@ We will provide technical support for NGINX Ingress Controller on any Kubernetes - VirtualServer resource now supports [wildcard hostname](https://kubernetes.io/docs/concepts/services-networking/ingress/#hostname-wildcards). - NGINX Ingress Controller images including the combined NGINX AppProtect WAF and NGINX AppProtect DoS solutions are now published to our registry. See [Images with NGINX Plus](https://docs.nginx.com/nginx-ingress-controller/technical-specifications/#images-with-nginx-plus) for a detailed list of images in our registry. - Added support for watching multiple namespaces using the [-watch-namespace](https://docs.nginx.com/nginx-ingress-controller/configuration/global-configuration/command-line-arguments/#-watch-namespace-string) cli argument. This can configured by passing a comma-separated list of namespaces to the `-watch-namespace` CLI argument (e.g. `-watch-namespace=ns-1,ns-2`). -- A new cli argument has been added: [-include-year](https://docs.nginx.com/nginx-ingress-controller/configuration/global-configuration/command-line-arguments/#-include-year). This appends the current year to the log output from the Ingress Controller. Example output: `I20220512 09:20:42.345457`. + - Post-startup configuration reloads have been optimized to reduce traffic impacts. When many resources are modified at the same time, changes are combined to reduce the number of data plane reloads. ### Features From 23a7d0bcf7a0e97352da5687a10adeb4de60d8f7 Mon Sep 17 00:00:00 2001 From: harsha-mangena Date: Fri, 21 Jun 2024 12:17:48 -0400 Subject: [PATCH 2/9] removed commented code --- charts/nginx-ingress/values.schema.json | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/charts/nginx-ingress/values.schema.json b/charts/nginx-ingress/values.schema.json index 5ea9ec5301..8627271d3e 100644 --- a/charts/nginx-ingress/values.schema.json +++ b/charts/nginx-ingress/values.schema.json @@ -908,14 +908,6 @@ false ] }, - // "includeYear": { - // "type": "boolean", - // "default": false, - // "title": "The includeYear", - // "examples": [ - // false - // ] - // }, "enableTLSPassthrough": { "type": "boolean", "default": false, @@ -1728,7 +1720,6 @@ "watchNamespace": "", "enableCustomResources": true, "enableOIDC": false, - // "includeYear": false, "enableTLSPassthrough": false, "tlsPassthroughPort": 443, "enableCertManager": false, @@ -2262,7 +2253,6 @@ "watchNamespace": "", "enableCustomResources": true, "enableOIDC": false, - // "includeYear": false, "enableTLSPassthrough": false, "enableCertManager": false, "enableExternalDNS": false, From cdf229991787229e8a809b68e95865f4133f1a32 Mon Sep 17 00:00:00 2001 From: harsha-mangena Date: Mon, 24 Jun 2024 15:07:54 -0400 Subject: [PATCH 3/9] - made `includeYear` flag as `true` by default. - removed commented code. --- charts/nginx-ingress/values.yaml | 4 ++-- cmd/nginx-ingress/flags.go | 13 +++++++------ docs/content/releases.md | 2 +- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/charts/nginx-ingress/values.yaml b/charts/nginx-ingress/values.yaml index 6fbca419eb..6f26ea0836 100644 --- a/charts/nginx-ingress/values.yaml +++ b/charts/nginx-ingress/values.yaml @@ -343,8 +343,8 @@ controller: ## Enable OIDC policies. enableOIDC: false - ## Include year in log header. This parameter will be removed in release 3.7 and the year will be included by default. - # includeYear: false + # Include year in log header. This parameter will be removed in release 3.7 and the year will be included by default. + includeYear: true ## Enable TLS Passthrough on port 443. Requires controller.enableCustomResources. enableTLSPassthrough: false diff --git a/cmd/nginx-ingress/flags.go b/cmd/nginx-ingress/flags.go index c90ab55f8b..e4f10874a7 100644 --- a/cmd/nginx-ingress/flags.go +++ b/cmd/nginx-ingress/flags.go @@ -6,6 +6,7 @@ import ( "net" "os" "regexp" + "strconv" "strings" "github.com/golang/glog" @@ -197,8 +198,8 @@ var ( enableExternalDNS = flag.Bool("enable-external-dns", false, "Enable external-dns controller for VirtualServer resources. Requires -enable-custom-resources") - // includeYearInLogs = flag.Bool("includeYear", false, - // "Option to include the year in the log header") + includeYearInLogs = flag.Bool("includeYear", false, + "Option to include the year in the log header") disableIPV6 = flag.Bool("disable-ipv6", false, `Disable IPV6 listeners explicitly for nodes that do not support the IPV6 stack`) @@ -304,10 +305,10 @@ func initialChecks() { glog.Fatalf("Error setting logtostderr to true: %v", err) } - // err = flag.Lookup("include_year").Value.Set(strconv.FormatBool(*includeYearInLogs)) - // if err != nil { - // glog.Fatalf("Error setting include_year flag: %v", err) - // } + err = flag.Lookup("include_year").Value.Set(strconv.FormatBool(*includeYearInLogs)) + if err != nil { + glog.Fatalf("Error setting include_year flag: %v", err) + } if startupCheckFn != nil { err := startupCheckFn() diff --git a/docs/content/releases.md b/docs/content/releases.md index 60d74f9dfc..c8948259db 100644 --- a/docs/content/releases.md +++ b/docs/content/releases.md @@ -744,7 +744,7 @@ We will provide technical support for NGINX Ingress Controller on any Kubernetes - VirtualServer resource now supports [wildcard hostname](https://kubernetes.io/docs/concepts/services-networking/ingress/#hostname-wildcards). - NGINX Ingress Controller images including the combined NGINX AppProtect WAF and NGINX AppProtect DoS solutions are now published to our registry. See [Images with NGINX Plus](https://docs.nginx.com/nginx-ingress-controller/technical-specifications/#images-with-nginx-plus) for a detailed list of images in our registry. - Added support for watching multiple namespaces using the [-watch-namespace](https://docs.nginx.com/nginx-ingress-controller/configuration/global-configuration/command-line-arguments/#-watch-namespace-string) cli argument. This can configured by passing a comma-separated list of namespaces to the `-watch-namespace` CLI argument (e.g. `-watch-namespace=ns-1,ns-2`). - +- A new cli argument has been added: [-include-year](https://docs.nginx.com/nginx-ingress-controller/configuration/global-configuration/command-line-arguments/#-include-year). This appends the current year to the log output from the Ingress Controller. Example output: `I20220512 09:20:42.345457`. - Post-startup configuration reloads have been optimized to reduce traffic impacts. When many resources are modified at the same time, changes are combined to reduce the number of data plane reloads. ### Features From e3d6a3c29f106bbcbdbf3f18e9ff3637b560de0a Mon Sep 17 00:00:00 2001 From: harsha-mangena Date: Tue, 25 Jun 2024 11:50:06 -0400 Subject: [PATCH 4/9] - addressed comments --- charts/nginx-ingress/values.yaml | 2 +- cmd/nginx-ingress/flags.go | 6 +----- .../global-configuration/command-line-arguments.md | 10 ---------- 3 files changed, 2 insertions(+), 16 deletions(-) diff --git a/charts/nginx-ingress/values.yaml b/charts/nginx-ingress/values.yaml index 6f26ea0836..b706b3e6d3 100644 --- a/charts/nginx-ingress/values.yaml +++ b/charts/nginx-ingress/values.yaml @@ -344,7 +344,7 @@ controller: enableOIDC: false # Include year in log header. This parameter will be removed in release 3.7 and the year will be included by default. - includeYear: true + # includeYear: true ## Enable TLS Passthrough on port 443. Requires controller.enableCustomResources. enableTLSPassthrough: false diff --git a/cmd/nginx-ingress/flags.go b/cmd/nginx-ingress/flags.go index e4f10874a7..548523f493 100644 --- a/cmd/nginx-ingress/flags.go +++ b/cmd/nginx-ingress/flags.go @@ -6,7 +6,6 @@ import ( "net" "os" "regexp" - "strconv" "strings" "github.com/golang/glog" @@ -198,9 +197,6 @@ var ( enableExternalDNS = flag.Bool("enable-external-dns", false, "Enable external-dns controller for VirtualServer resources. Requires -enable-custom-resources") - includeYearInLogs = flag.Bool("includeYear", false, - "Option to include the year in the log header") - disableIPV6 = flag.Bool("disable-ipv6", false, `Disable IPV6 listeners explicitly for nodes that do not support the IPV6 stack`) @@ -305,7 +301,7 @@ func initialChecks() { glog.Fatalf("Error setting logtostderr to true: %v", err) } - err = flag.Lookup("include_year").Value.Set(strconv.FormatBool(*includeYearInLogs)) + err = flag.Lookup("include_year").Value.Set("true") if err != nil { glog.Fatalf("Error setting include_year flag: %v", err) } diff --git a/docs/content/configuration/global-configuration/command-line-arguments.md b/docs/content/configuration/global-configuration/command-line-arguments.md index f08760c147..eb3f96c3bc 100644 --- a/docs/content/configuration/global-configuration/command-line-arguments.md +++ b/docs/content/configuration/global-configuration/command-line-arguments.md @@ -81,16 +81,6 @@ Default `false`. --- - - ---- - ### -enable-leader-election Enables Leader election to avoid multiple replicas of the controller reporting the status of Ingress, VirtualServer and VirtualServerRoute resources -- only one replica will report status. From 6d1c175c09e9b7b509b7d25a4ddc52fa056a25d6 Mon Sep 17 00:00:00 2001 From: harsha-mangena Date: Tue, 25 Jun 2024 12:37:25 -0400 Subject: [PATCH 5/9] recommit - yaml --- charts/nginx-ingress/values.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/charts/nginx-ingress/values.yaml b/charts/nginx-ingress/values.yaml index b706b3e6d3..f516d83617 100644 --- a/charts/nginx-ingress/values.yaml +++ b/charts/nginx-ingress/values.yaml @@ -343,9 +343,6 @@ controller: ## Enable OIDC policies. enableOIDC: false - # Include year in log header. This parameter will be removed in release 3.7 and the year will be included by default. - # includeYear: true - ## Enable TLS Passthrough on port 443. Requires controller.enableCustomResources. enableTLSPassthrough: false From e183cac02dcfe24da8c4d9838c9db6df040ce44b Mon Sep 17 00:00:00 2001 From: harsha-mangena <44197358+harsha-mangena@users.noreply.github.com> Date: Wed, 26 Jun 2024 10:05:49 -0400 Subject: [PATCH 6/9] removed include-year arg Signed-off-by: harsha-mangena <44197358+harsha-mangena@users.noreply.github.com> --- deployments/deployment/nginx-ingress.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/deployments/deployment/nginx-ingress.yaml b/deployments/deployment/nginx-ingress.yaml index 2a1469b812..46eb2c51f3 100644 --- a/deployments/deployment/nginx-ingress.yaml +++ b/deployments/deployment/nginx-ingress.yaml @@ -90,7 +90,6 @@ spec: - -report-ingress-status - -external-service=nginx-ingress #- -default-server-tls-secret=$(POD_NAMESPACE)/default-server-secret - #- -include-year #- -enable-cert-manager #- -enable-external-dns #- -v=3 # Enables extensive logging. Useful for troubleshooting. From b656706cf39818f2137342f3c3c94b96bc09dfcb Mon Sep 17 00:00:00 2001 From: harsha-mangena <44197358+harsha-mangena@users.noreply.github.com> Date: Wed, 26 Jun 2024 10:06:22 -0400 Subject: [PATCH 7/9] removed include-year arg Signed-off-by: harsha-mangena <44197358+harsha-mangena@users.noreply.github.com> --- deployments/deployment/nginx-plus-ingress.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/deployments/deployment/nginx-plus-ingress.yaml b/deployments/deployment/nginx-plus-ingress.yaml index 74f7e3b560..29246d52e4 100644 --- a/deployments/deployment/nginx-plus-ingress.yaml +++ b/deployments/deployment/nginx-plus-ingress.yaml @@ -93,7 +93,6 @@ spec: - -report-ingress-status - -external-service=nginx-ingress #- -default-server-tls-secret=$(POD_NAMESPACE)/default-server-secret - #- -include-year #- -enable-cert-manager #- -enable-external-dns #- -enable-app-protect From 21abdc9b7779b8b379131255ad151e420c77be20 Mon Sep 17 00:00:00 2001 From: harsha-mangena <44197358+harsha-mangena@users.noreply.github.com> Date: Wed, 26 Jun 2024 10:07:27 -0400 Subject: [PATCH 8/9] removed include-year arg Signed-off-by: harsha-mangena <44197358+harsha-mangena@users.noreply.github.com> --- deployments/daemon-set/nginx-ingress.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/deployments/daemon-set/nginx-ingress.yaml b/deployments/daemon-set/nginx-ingress.yaml index 2f462e449f..e055f379cf 100644 --- a/deployments/daemon-set/nginx-ingress.yaml +++ b/deployments/daemon-set/nginx-ingress.yaml @@ -91,7 +91,6 @@ spec: - -report-ingress-status - -external-service=nginx-ingress #- -default-server-tls-secret=$(POD_NAMESPACE)/default-server-secret - #- -include-year #- -v=3 # Enables extensive logging. Useful for troubleshooting. #- -enable-prometheus-metrics #- -global-configuration=$(POD_NAMESPACE)/nginx-configuration From d6cf46e46e32a892e588620b87f775feaac7b2d4 Mon Sep 17 00:00:00 2001 From: harsha-mangena <44197358+harsha-mangena@users.noreply.github.com> Date: Wed, 26 Jun 2024 10:07:53 -0400 Subject: [PATCH 9/9] removed include-year arg Signed-off-by: harsha-mangena <44197358+harsha-mangena@users.noreply.github.com> --- deployments/daemon-set/nginx-plus-ingress.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/deployments/daemon-set/nginx-plus-ingress.yaml b/deployments/daemon-set/nginx-plus-ingress.yaml index a769154900..1227e5edb6 100644 --- a/deployments/daemon-set/nginx-plus-ingress.yaml +++ b/deployments/daemon-set/nginx-plus-ingress.yaml @@ -92,7 +92,6 @@ spec: - -report-ingress-status - -external-service=nginx-ingress #- -default-server-tls-secret=$(POD_NAMESPACE)/default-server-secret - #- -include-year #- -enable-app-protect #- -enable-app-protect-dos #- -v=3 # Enables extensive logging. Useful for troubleshooting.