Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove include-year and includeYear flag #5817

Merged
merged 13 commits into from
Jun 27, 2024
Merged
1 change: 0 additions & 1 deletion charts/nginx-ingress/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
10 changes: 0 additions & 10 deletions charts/nginx-ingress/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -908,14 +908,6 @@
false
]
},
"includeYear": {
"type": "boolean",
"default": false,
"title": "The includeYear",
"examples": [
false
]
},
"enableTLSPassthrough": {
"type": "boolean",
"default": false,
Expand Down Expand Up @@ -1728,7 +1720,6 @@
"watchNamespace": "",
"enableCustomResources": true,
"enableOIDC": false,
"includeYear": false,
"enableTLSPassthrough": false,
"tlsPassthroughPort": 443,
"enableCertManager": false,
Expand Down Expand Up @@ -2262,7 +2253,6 @@
"watchNamespace": "",
"enableCustomResources": true,
"enableOIDC": false,
"includeYear": false,
"enableTLSPassthrough": false,
"enableCertManager": false,
"enableExternalDNS": false,
Expand Down
2 changes: 1 addition & 1 deletion charts/nginx-ingress/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 6 additions & 7 deletions cmd/nginx-ingress/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"net"
"os"
"regexp"
"strconv"
"strings"

"github.com/golang/glog"
Expand Down Expand Up @@ -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`)
Expand Down Expand Up @@ -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))
j1m-ryan marked this conversation as resolved.
Show resolved Hide resolved
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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@ Default `false`.

---

### -include-year
<!-- ### -include-year
j1m-ryan marked this conversation as resolved.
Show resolved Hide resolved

Adds year to log headers.
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 >}}
{{< note >}} This flag will be removed in release 3.7 and the year will be included by default. {{< /note >}} -->

---

Expand Down
2 changes: 1 addition & 1 deletion docs/content/releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
<!-- - 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`. -->
j1m-ryan marked this conversation as resolved.
Show resolved Hide resolved
- 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.

### <i class="fa-solid fa-rocket"></i> Features
Expand Down