Skip to content

Commit 7997f8d

Browse files
authored
Merge branch 'main' into feat/hostPort
2 parents f84d3be + 0ab30e6 commit 7997f8d

File tree

31 files changed

+462
-201
lines changed

31 files changed

+462
-201
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ jobs:
163163
164164
- name: Scan SBOM
165165
id: scan
166-
uses: anchore/scan-action@be7a22da4f22dde446c4c4c099887ff5b256526c # v6.3.0
166+
uses: anchore/scan-action@16910ac423301c6d30554b83a7f71ac6ff4a51f3 # v6.4.0
167167
with:
168168
sbom: "sbom-${{ inputs.image }}.json"
169169
only-fixed: true

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ jobs:
161161
if: ${{ github.event_name == 'push' && github.ref != 'refs/heads/main' }}
162162

163163
- name: Download Syft
164-
uses: anchore/sbom-action/download-syft@9246b90769f852b3a8921f330c59e0b3f439d6e9 # v0.20.1
164+
uses: anchore/sbom-action/download-syft@cee1b8e05ae5b2593a75e197229729eabaa9f8ec # v0.20.2
165165
if: github.ref_type == 'tag'
166166

167167
- name: Install Cosign

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
4141
with:
4242
working-directory: ${{ matrix.directory }}
43-
version: v2.1.6 # renovate: datasource=github-tags depName=golangci/golangci-lint
43+
version: v2.2.1 # renovate: datasource=github-tags depName=golangci/golangci-lint
4444

4545
njs-lint:
4646
name: NJS Lint

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ repos:
3939
- javascript
4040

4141
- repo: https://github.com/golangci/golangci-lint
42-
rev: v2.1.6
42+
rev: v2.2.1
4343
hooks:
4444
- id: golangci-lint-full
4545
name: golangci-lint-root

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ GO_LINKER_FLAGS = $(GO_LINKER_FLAGS_OPTIMIZATIONS) $(GO_LINKER_FlAGS_VARS)
2323

2424
# tools versions
2525
# renovate: datasource=github-tags depName=golangci/golangci-lint
26-
GOLANGCI_LINT_VERSION = v2.1.6
26+
GOLANGCI_LINT_VERSION = v2.2.1
2727
# renovate: datasource=docker depName=kindest/node
2828
KIND_K8S_VERSION = v1.33.1
2929
# renovate: datasource=github-tags depName=norwoodj/helm-docs
@@ -126,7 +126,7 @@ generate-crds: ## Generate CRDs and Go types using kubebuilder
126126

127127
.PHONY: install-crds
128128
install-crds: ## Install CRDs
129-
kubectl kustomize $(SELF_DIR)config/crd | kubectl apply -f -
129+
kubectl kustomize $(SELF_DIR)config/crd | kubectl apply --server-side -f -
130130

131131
.PHONY: install-gateway-crds
132132
install-gateway-crds: ## Install Gateway API CRDs

build/Dockerfile.nginx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,10 @@ RUN --mount=type=bind,from=nginx-files,src=nginx_signing.rsa.pub,target=/etc/apk
1616
printf "%s\n" "https://packages.nginx.org/nginx-agent/alpine/v$(egrep -o '^[0-9]+\.[0-9]+' /etc/alpine-release)/main" >> /etc/apk/repositories \
1717
&& apk add --no-cache nginx-agent=${NGINX_AGENT_VERSION#v}
1818

19-
RUN apk add --no-cache libcap bash \
19+
RUN apk add --no-cache bash \
2020
&& mkdir -p /usr/lib/nginx/modules \
21-
&& setcap 'cap_net_bind_service=+ep' /usr/sbin/nginx \
22-
&& setcap -v 'cap_net_bind_service=+ep' /usr/sbin/nginx \
23-
&& setcap 'cap_net_bind_service=+ep' /usr/sbin/nginx-debug \
24-
&& setcap -v 'cap_net_bind_service=+ep' /usr/sbin/nginx-debug \
2521
# Update packages for CVE-2025-32414 and CVE-2025-32415
2622
&& apk --no-cache upgrade libxml2 \
27-
&& apk del libcap \
2823
# forward request and error logs to docker log collector
2924
&& ln -sf /dev/stdout /var/log/nginx/access.log \
3025
&& ln -sf /dev/stderr /var/log/nginx/error.log

build/Dockerfile.nginxplus

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,8 @@ RUN --mount=type=secret,id=nginx-repo.crt,dst=/etc/apk/cert.pem,mode=0644 \
2222
&& printf "%s\n" "https://pkgs.nginx.com/nginx-agent/alpine/v$(egrep -o '^[0-9]+\.[0-9]+' /etc/alpine-release)/main" >> /etc/apk/repositories \
2323
&& apk add --no-cache nginx-plus nginx-plus-module-njs nginx-plus-module-otel nginx-agent=${NGINX_AGENT_VERSION#v}
2424

25-
RUN apk add --no-cache libcap bash \
25+
RUN apk add --no-cache bash \
2626
&& mkdir -p /usr/lib/nginx/modules \
27-
&& setcap 'cap_net_bind_service=+ep' /usr/sbin/nginx \
28-
&& setcap -v 'cap_net_bind_service=+ep' /usr/sbin/nginx \
29-
&& setcap 'cap_net_bind_service=+ep' /usr/sbin/nginx-debug \
30-
&& setcap -v 'cap_net_bind_service=+ep' /usr/sbin/nginx-debug \
31-
&& apk del libcap \
3227
# forward request and error logs to docker log collector
3328
&& ln -sf /dev/stdout /var/log/nginx/access.log \
3429
&& ln -sf /dev/stderr /var/log/nginx/error.log

charts/nginx-gateway-fabric/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ Helm does not upgrade the NGINX Gateway Fabric CRDs during a release upgrade. Be
139139
must [pull the chart](#pulling-the-chart) from GitHub and run the following command to upgrade the CRDs:
140140

141141
```shell
142-
kubectl apply -f crds/
142+
kubectl apply --server-side -f crds/
143143
```
144144

145145
The following warning is expected and can be ignored:

charts/nginx-gateway-fabric/README.md.gotmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ Helm does not upgrade the NGINX Gateway Fabric CRDs during a release upgrade. Be
137137
must [pull the chart](#pulling-the-chart) from GitHub and run the following command to upgrade the CRDs:
138138

139139
```shell
140-
kubectl apply -f crds/
140+
kubectl apply --server-side -f crds/
141141
```
142142

143143
The following warning is expected and can be ignored:

charts/nginx-gateway-fabric/templates/deployment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ spec:
3535
{{- end }}
3636
{{- end }}
3737
spec:
38+
automountServiceAccountToken: true
3839
containers:
3940
- args:
4041
- controller

charts/nginx-gateway-fabric/templates/scc.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ metadata:
4444
name: {{ include "nginx-gateway.scc-name" . }}-nginx
4545
labels:
4646
{{- include "nginx-gateway.labels" . | nindent 4 }}
47+
allowPrivilegeEscalation: false
4748
allowHostDirVolumePlugin: false
4849
allowHostIPC: false
4950
allowHostNetwork: false
@@ -69,8 +70,6 @@ seLinuxContext:
6970
type: MustRunAs
7071
seccompProfiles:
7172
- runtime/default
72-
allowedCapabilities:
73-
- NET_BIND_SERVICE
7473
requiredDropCapabilities:
7574
- ALL
7675
volumes:

charts/nginx-gateway-fabric/templates/serviceaccount.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ metadata:
77
{{- include "nginx-gateway.labels" . | nindent 4 }}
88
annotations:
99
{{- toYaml .Values.nginxGateway.serviceAccount.annotations | nindent 4 }}
10+
automountServiceAccountToken: false
1011
{{- if or .Values.nginxGateway.serviceAccount.imagePullSecret .Values.nginxGateway.serviceAccount.imagePullSecrets }}
1112
imagePullSecrets:
1213
{{- if .Values.nginxGateway.serviceAccount.imagePullSecret }}

charts/nginx-gateway-fabric/values.yaml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ clusterDomain: cluster.local
55

66
# -- The nginxGateway section contains configuration for the NGINX Gateway Fabric control plane deployment.
77
nginxGateway:
8-
# FIXME(lucacome): https://github.com/nginx/nginx-gateway-fabric/issues/2490
9-
108
# @schema
119
# const: deployment
1210
# @schema
@@ -396,9 +394,9 @@ nginx:
396394
# -- The topology spread constraints for the NGINX data plane pod.
397395
# topologySpreadConstraints: []
398396

399-
# -- extraVolumes for the NGINX data plane pod. Use in conjunction with
400-
# nginx.container.extraVolumeMounts mount additional volumes to the container.
401-
# extraVolumes: []
397+
# -- The volumes for the NGINX data plane pod. Use in conjunction with
398+
# nginx.container.volumeMounts mount additional volumes to the container.
399+
# volumes: []
402400

403401
# -- The container configuration for the NGINX container. This is applied globally to all Gateways managed by this
404402
# instance of NGINX Gateway Fabric.
@@ -435,8 +433,8 @@ nginx:
435433
# -- The lifecycle of the NGINX container.
436434
lifecycle: {}
437435

438-
# -- extraVolumeMounts are the additional volume mounts for the NGINX container.
439-
extraVolumeMounts: []
436+
# -- volumeMounts are the additional volume mounts for the NGINX container.
437+
# volumeMounts: []
440438

441439
# -- The service configuration for the NGINX data plane. This is applied globally to all Gateways managed by this
442440
# instance of NGINX Gateway Fabric.

deploy/azure/deploy.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ metadata:
44
name: nginx-gateway
55
---
66
apiVersion: v1
7+
automountServiceAccountToken: false
78
kind: ServiceAccount
89
metadata:
910
labels:
@@ -252,6 +253,7 @@ spec:
252253
app.kubernetes.io/instance: nginx-gateway
253254
app.kubernetes.io/name: nginx-gateway
254255
spec:
256+
automountServiceAccountToken: true
255257
containers:
256258
- args:
257259
- controller

deploy/default/deploy.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ metadata:
44
name: nginx-gateway
55
---
66
apiVersion: v1
7+
automountServiceAccountToken: false
78
kind: ServiceAccount
89
metadata:
910
labels:
@@ -252,6 +253,7 @@ spec:
252253
app.kubernetes.io/instance: nginx-gateway
253254
app.kubernetes.io/name: nginx-gateway
254255
spec:
256+
automountServiceAccountToken: true
255257
containers:
256258
- args:
257259
- controller

deploy/experimental-nginx-plus/deploy.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ metadata:
44
name: nginx-gateway
55
---
66
apiVersion: v1
7+
automountServiceAccountToken: false
78
kind: ServiceAccount
89
metadata:
910
labels:
@@ -256,6 +257,7 @@ spec:
256257
app.kubernetes.io/instance: nginx-gateway
257258
app.kubernetes.io/name: nginx-gateway
258259
spec:
260+
automountServiceAccountToken: true
259261
containers:
260262
- args:
261263
- controller

deploy/experimental/deploy.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ metadata:
44
name: nginx-gateway
55
---
66
apiVersion: v1
7+
automountServiceAccountToken: false
78
kind: ServiceAccount
89
metadata:
910
labels:
@@ -256,6 +257,7 @@ spec:
256257
app.kubernetes.io/instance: nginx-gateway
257258
app.kubernetes.io/name: nginx-gateway
258259
spec:
260+
automountServiceAccountToken: true
259261
containers:
260262
- args:
261263
- controller

deploy/nginx-plus/deploy.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ metadata:
44
name: nginx-gateway
55
---
66
apiVersion: v1
7+
automountServiceAccountToken: false
78
kind: ServiceAccount
89
metadata:
910
labels:
@@ -252,6 +253,7 @@ spec:
252253
app.kubernetes.io/instance: nginx-gateway
253254
app.kubernetes.io/name: nginx-gateway
254255
spec:
256+
automountServiceAccountToken: true
255257
containers:
256258
- args:
257259
- controller

deploy/nodeport/deploy.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ metadata:
44
name: nginx-gateway
55
---
66
apiVersion: v1
7+
automountServiceAccountToken: false
78
kind: ServiceAccount
89
metadata:
910
labels:
@@ -252,6 +253,7 @@ spec:
252253
app.kubernetes.io/instance: nginx-gateway
253254
app.kubernetes.io/name: nginx-gateway
254255
spec:
256+
automountServiceAccountToken: true
255257
containers:
256258
- args:
257259
- controller

deploy/openshift/deploy.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ metadata:
44
name: nginx-gateway
55
---
66
apiVersion: v1
7+
automountServiceAccountToken: false
78
kind: ServiceAccount
89
metadata:
910
labels:
@@ -273,6 +274,7 @@ spec:
273274
app.kubernetes.io/instance: nginx-gateway
274275
app.kubernetes.io/name: nginx-gateway
275276
spec:
277+
automountServiceAccountToken: true
276278
containers:
277279
- args:
278280
- controller
@@ -527,9 +529,8 @@ allowHostIPC: false
527529
allowHostNetwork: false
528530
allowHostPID: false
529531
allowHostPorts: false
532+
allowPrivilegeEscalation: false
530533
allowPrivilegedContainer: false
531-
allowedCapabilities:
532-
- NET_BIND_SERVICE
533534
apiVersion: security.openshift.io/v1
534535
fsGroup:
535536
ranges:

deploy/snippets-filters-nginx-plus/deploy.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ metadata:
44
name: nginx-gateway
55
---
66
apiVersion: v1
7+
automountServiceAccountToken: false
78
kind: ServiceAccount
89
metadata:
910
labels:
@@ -254,6 +255,7 @@ spec:
254255
app.kubernetes.io/instance: nginx-gateway
255256
app.kubernetes.io/name: nginx-gateway
256257
spec:
258+
automountServiceAccountToken: true
257259
containers:
258260
- args:
259261
- controller

deploy/snippets-filters/deploy.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ metadata:
44
name: nginx-gateway
55
---
66
apiVersion: v1
7+
automountServiceAccountToken: false
78
kind: ServiceAccount
89
metadata:
910
labels:
@@ -254,6 +255,7 @@ spec:
254255
app.kubernetes.io/instance: nginx-gateway
255256
app.kubernetes.io/name: nginx-gateway
256257
spec:
258+
automountServiceAccountToken: true
257259
containers:
258260
- args:
259261
- controller

docs/developer/quickstart.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ This will build the docker images `nginx-gateway-fabric:<your-user>` and `nginx-
201201
If the only change is the image repository and tag, you can update the `kustomization.yaml` file in `deploy/` with the desired values and deployment mainifest and run the following commands:
202202

203203
```shell
204-
kubectl apply -f deploy/crds.yaml
204+
kubectl apply --server-side -f deploy/crds.yaml
205205
kubectl kustomize deploy | kubectl apply -f -
206206
```
207207

0 commit comments

Comments
 (0)