From a991a936e1ac6b005877ae313dd1017978b08059 Mon Sep 17 00:00:00 2001 From: harsha-mangena <44197358+harsha-mangena@users.noreply.github.com> Date: Thu, 27 Jun 2024 12:58:30 -0400 Subject: [PATCH] [removes] `include-year` and `includeYear` flag (#5817) * - refer https://github.com/nginxinc/kubernetes-ingress/issues/5776 - commented deprecated include-year and IncludeYear * removed commented code * - made `includeYear` flag as `true` by default. - removed commented code. * - addressed comments * recommit - yaml * removed include-year arg Signed-off-by: harsha-mangena <44197358+harsha-mangena@users.noreply.github.com> * removed include-year arg Signed-off-by: harsha-mangena <44197358+harsha-mangena@users.noreply.github.com> * removed include-year arg Signed-off-by: harsha-mangena <44197358+harsha-mangena@users.noreply.github.com> * removed include-year arg Signed-off-by: harsha-mangena <44197358+harsha-mangena@users.noreply.github.com> --------- Signed-off-by: harsha-mangena <44197358+harsha-mangena@users.noreply.github.com> Co-authored-by: Jim Ryan --- charts/nginx-ingress/templates/_helpers.tpl | 1 - charts/nginx-ingress/values.schema.json | 10 ---------- charts/nginx-ingress/values.yaml | 3 --- cmd/nginx-ingress/flags.go | 6 +----- deployments/daemon-set/nginx-ingress.yaml | 1 - deployments/daemon-set/nginx-plus-ingress.yaml | 1 - deployments/deployment/nginx-ingress.yaml | 1 - deployments/deployment/nginx-plus-ingress.yaml | 1 - .../global-configuration/command-line-arguments.md | 10 ---------- 9 files changed, 1 insertion(+), 33 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 6c53cfe6b7..07dac0529e 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, diff --git a/charts/nginx-ingress/values.yaml b/charts/nginx-ingress/values.yaml index a3b888ab4c..dd639aa00d 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: 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..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("include-year", 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/deployments/daemon-set/nginx-ingress.yaml b/deployments/daemon-set/nginx-ingress.yaml index 74bb3f1d0d..6a4e85907b 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 diff --git a/deployments/daemon-set/nginx-plus-ingress.yaml b/deployments/daemon-set/nginx-plus-ingress.yaml index 71c244585b..4f885b24e6 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. diff --git a/deployments/deployment/nginx-ingress.yaml b/deployments/deployment/nginx-ingress.yaml index 5169f1db7b..04f5c4fa49 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. diff --git a/deployments/deployment/nginx-plus-ingress.yaml b/deployments/deployment/nginx-plus-ingress.yaml index 6868cb3497..4b2e2151c6 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 diff --git a/docs/content/configuration/global-configuration/command-line-arguments.md b/docs/content/configuration/global-configuration/command-line-arguments.md index 377ea9ea6b..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`. --- -### -include-year - -Adds year to log headers. - -Default `false`. - -{{< note >}} This flag will be removed in release 3.7 and the year will be included by default. {{< /note >}} - ---- - ### -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.