Skip to content

Commit c2a6cb7

Browse files
authored
Merge branch 'main' into enh/ip-addr-trust
2 parents 8045dc7 + 4ad9b3d commit c2a6cb7

File tree

8 files changed

+14
-10
lines changed

8 files changed

+14
-10
lines changed

.github/workflows/build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ jobs:
131131
DOCKER_METADATA_ANNOTATIONS_LEVELS: manifest,index
132132

133133
- name: Build Docker Image
134-
uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6.7.0
134+
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0
135135
with:
136136
file: build/Dockerfile${{ inputs.image == 'nginx' && '.nginx' || '' }}${{ inputs.image == 'plus' && '.nginxplus' || '' }}
137137
context: "."

.github/workflows/conformance.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ jobs:
8989
TELEMETRY_ENDPOINT_INSECURE: "false"
9090

9191
- name: Build NGF Docker Image
92-
uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6.7.0
92+
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0
9393
with:
9494
file: build/Dockerfile
9595
tags: ${{ steps.ngf-meta.outputs.tags }}
@@ -100,7 +100,7 @@ jobs:
100100
pull: true
101101

102102
- name: Build NGINX Docker Image
103-
uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6.7.0
103+
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0
104104
with:
105105
file: build/Dockerfile${{ inputs.image == 'nginx' && '.nginx' || '' }}${{ inputs.image == 'plus' && '.nginxplus' || ''}}
106106
tags: ${{ steps.nginx-meta.outputs.tags }}
@@ -119,7 +119,7 @@ jobs:
119119
working-directory: ./tests
120120

121121
- name: Build Test Docker Image
122-
uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6.7.0
122+
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0
123123
with:
124124
file: tests/conformance/Dockerfile
125125
tags: conformance-test-runner:${{ github.sha }}

.github/workflows/functional.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jobs:
7676
TELEMETRY_ENDPOINT_INSECURE: "true"
7777

7878
- name: Build NGF Docker Image
79-
uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6.7.0
79+
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0
8080
with:
8181
file: build/Dockerfile
8282
tags: ${{ steps.ngf-meta.outputs.tags }}
@@ -87,7 +87,7 @@ jobs:
8787
target: goreleaser
8888

8989
- name: Build NGINX Docker Image
90-
uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6.7.0
90+
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0
9191
with:
9292
file: build/Dockerfile${{ inputs.image == 'nginx' && '.nginx' || '' }}${{ inputs.image == 'plus' && '.nginxplus' || ''}}
9393
tags: ${{ steps.nginx-meta.outputs.tags }}

.github/workflows/helm.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
type=ref,event=branch,suffix=-rc,enable=${{ startsWith(github.ref, 'refs/heads/release') }}
6161
6262
- name: Build NGF Docker Image
63-
uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6.7.0
63+
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0
6464
with:
6565
file: build/Dockerfile
6666
tags: ${{ steps.ngf-meta.outputs.tags }}
@@ -71,7 +71,7 @@ jobs:
7171
pull: true
7272

7373
- name: Build NGINX Docker Image
74-
uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6.7.0
74+
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0
7575
with:
7676
file: build/Dockerfile${{ inputs.image == 'nginx' && '.nginx' || '' }}${{ inputs.image == 'plus' && '.nginxplus' || ''}}
7777
tags: ${{ steps.nginx-meta.outputs.tags }}

cmd/gateway/commands.go

+3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import (
1313
"go.uber.org/zap"
1414
"k8s.io/apimachinery/pkg/types"
1515
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
16+
"k8s.io/klog/v2"
1617
"sigs.k8s.io/controller-runtime/pkg/log"
1718
ctlrZap "sigs.k8s.io/controller-runtime/pkg/log/zap"
1819

@@ -125,6 +126,8 @@ func createStaticModeCommand() *cobra.Command {
125126
atom := zap.NewAtomicLevel()
126127

127128
logger := ctlrZap.New(ctlrZap.Level(atom))
129+
klog.SetLogger(logger)
130+
128131
commit, date, dirty := getBuildInfo()
129132
logger.Info(
130133
"Starting NGINX Gateway Fabric in static mode",

docs/developer/logging-guidelines.md

+1
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,7 @@ There are two critical libraries for NGF that log:
383383
of that project.
384384
- [client-go](https://github.com./kubernetes/client-go).
385385
- It uses [klog](https://github.com./kubernetes/klog) for logging.
386+
- We inject the above logger into klog to ensure it uses the same formatting.
386387
- Most of the logging is done at increased klog-specific
387388
verbosity. However, errors are logged at the default verbosity like
388389
in [this line](https://github.com./kubernetes/client-go/blob/c5b1c13ccbedeb03c00ba162ef27566b0dfb512d/tools/record/event.go#L240).

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ require (
2323
k8s.io/apiextensions-apiserver v0.31.1
2424
k8s.io/apimachinery v0.31.1
2525
k8s.io/client-go v0.31.1
26+
k8s.io/klog/v2 v2.130.1
2627
sigs.k8s.io/controller-runtime v0.19.0
2728
sigs.k8s.io/gateway-api v1.1.0
2829
)
@@ -89,7 +90,6 @@ require (
8990
gopkg.in/inf.v0 v0.9.1 // indirect
9091
gopkg.in/yaml.v2 v2.4.0 // indirect
9192
gopkg.in/yaml.v3 v3.0.1 // indirect
92-
k8s.io/klog/v2 v2.130.1 // indirect
9393
k8s.io/kube-openapi v0.0.0-20240423202451-8948a665c108 // indirect
9494
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect
9595
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect

site/content/how-to/monitoring/troubleshooting.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ You can see logs for a crashed or killed container by adding the `-p` flag to th
131131

132132
1. Modify Log Levels
133133

134-
To modify log levels for the control plane in NGINX Gateway Fabric, edit the `NginxGateway` configuration. This can be done either before or after deploying NGINX Gateway Fabric. Refer to this [guide](https://docs.nginx.com/nginx-gateway-fabric/how-to/configuration/control-plane-configuration) to do so.
134+
To modify log levels for the control plane in NGINX Gateway Fabric, edit the `NginxGateway` configuration. This can be done either before or after deploying NGINX Gateway Fabric. Refer to this [guide](https://docs.nginx.com/nginx-gateway-fabric/how-to/control-plane-configuration/) to do so.
135135
To check error logs, modify the log level to `error` to view error logs. Similarly, change the log level to `debug` and `grep` for the word `debug` to view debug logs.
136136

137137
#### Understanding the generated NGINX configuration

0 commit comments

Comments
 (0)