Skip to content

Commit 506b01c

Browse files
committed
Merge branch 'main' into tests/cel-clientsettingspolicies
2 parents 9274e57 + 0ca388f commit 506b01c

File tree

72 files changed

+2052
-659
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+2052
-659
lines changed

apis/v1alpha2/nginxproxy_types.go

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,11 @@ type KubernetesSpec struct {
390390

391391
// Deployment is the configuration for the NGINX Deployment.
392392
type DeploymentSpec struct {
393+
// Container defines container fields for the NGINX container.
394+
//
395+
// +optional
396+
Container ContainerSpec `json:"container"`
397+
393398
// Number of desired Pods.
394399
//
395400
// +optional
@@ -399,24 +404,19 @@ type DeploymentSpec struct {
399404
//
400405
// +optional
401406
Pod PodSpec `json:"pod"`
407+
}
402408

409+
// DaemonSet is the configuration for the NGINX DaemonSet.
410+
type DaemonSetSpec struct {
403411
// Container defines container fields for the NGINX container.
404412
//
405413
// +optional
406414
Container ContainerSpec `json:"container"`
407-
}
408415

409-
// DaemonSet is the configuration for the NGINX DaemonSet.
410-
type DaemonSetSpec struct {
411416
// Pod defines Pod-specific fields.
412417
//
413418
// +optional
414419
Pod PodSpec `json:"pod"`
415-
416-
// Container defines container fields for the NGINX container.
417-
//
418-
// +optional
419-
Container ContainerSpec `json:"container"`
420420
}
421421

422422
// PodSpec defines Pod-specific fields.
@@ -486,6 +486,11 @@ type ContainerSpec struct {
486486
// +optional
487487
Lifecycle *corev1.Lifecycle `json:"lifecycle,omitempty"`
488488

489+
// ReadinessProbe defines the readiness probe for the NGINX container.
490+
//
491+
// +optional
492+
ReadinessProbe *ReadinessProbeSpec `json:"readinessProbe,omitempty"`
493+
489494
// HostPorts are the list of ports to expose on the host.
490495
//
491496
// +optional
@@ -497,6 +502,26 @@ type ContainerSpec struct {
497502
VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty"`
498503
}
499504

505+
// ReadinessProbeSpec defines the configuration for the NGINX readiness probe.
506+
type ReadinessProbeSpec struct {
507+
// Port is the port on which the readiness endpoint is exposed.
508+
// If not specified, the default port is 8081.
509+
//
510+
// +optional
511+
// +kubebuilder:validation:Minimum=1
512+
// +kubebuilder:validation:Maximum=65535
513+
Port *int32 `json:"port,omitempty"`
514+
515+
// InitialDelaySeconds is the number of seconds after the container has
516+
// started before the readiness probe is initiated.
517+
// If not specified, the default is 3 seconds.
518+
//
519+
// +optional
520+
// +kubebuilder:validation:Minimum=0
521+
// +kubebuilder:validation:Maximum=3600
522+
InitialDelaySeconds *int32 `json:"initialDelaySeconds,omitempty"`
523+
}
524+
500525
// Image is the NGINX image to use.
501526
type Image struct {
502527
// Repository is the image path.

apis/v1alpha2/zz_generated.deepcopy.go

Lines changed: 32 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

charts/nginx-gateway-fabric/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,9 +264,9 @@ The following table lists the configurable parameters of the NGINX Gateway Fabri
264264
| `certGenerator.ttlSecondsAfterFinished` | How long to wait after the cert generator job has finished before it is removed by the job controller. | int | `30` |
265265
| `clusterDomain` | The DNS cluster domain of your Kubernetes cluster. | string | `"cluster.local"` |
266266
| `gateways` | A list of Gateway objects. View https://gateway-api.sigs.k8s.io/reference/spec/#gateway for full Gateway reference. | list | `[]` |
267-
| `nginx` | The nginx section contains the configuration for all NGINX data plane deployments installed by the NGINX Gateway Fabric control plane. | object | `{"config":{},"container":{"hostPorts":[],"lifecycle":{},"resources":{},"volumeMounts":[]},"debug":false,"image":{"pullPolicy":"Always","repository":"ghcr.io/nginx/nginx-gateway-fabric/nginx","tag":"edge"},"imagePullSecret":"","imagePullSecrets":[],"kind":"deployment","plus":false,"pod":{},"replicas":1,"service":{"externalTrafficPolicy":"Local","loadBalancerClass":"","loadBalancerIP":"","loadBalancerSourceRanges":[],"nodePorts":[],"type":"LoadBalancer"},"usage":{"caSecretName":"","clientSSLSecretName":"","endpoint":"","resolver":"","secretName":"nplus-license","skipVerify":false}}` |
267+
| `nginx` | The nginx section contains the configuration for all NGINX data plane deployments installed by the NGINX Gateway Fabric control plane. | object | `{"config":{},"container":{"hostPorts":[],"lifecycle":{},"readinessProbe":{},"resources":{},"volumeMounts":[]},"debug":false,"image":{"pullPolicy":"Always","repository":"ghcr.io/nginx/nginx-gateway-fabric/nginx","tag":"edge"},"imagePullSecret":"","imagePullSecrets":[],"kind":"deployment","plus":false,"pod":{},"replicas":1,"service":{"externalTrafficPolicy":"Local","loadBalancerClass":"","loadBalancerIP":"","loadBalancerSourceRanges":[],"nodePorts":[],"type":"LoadBalancer"},"usage":{"caSecretName":"","clientSSLSecretName":"","endpoint":"","resolver":"","secretName":"nplus-license","skipVerify":false}}` |
268268
| `nginx.config` | The configuration for the data plane that is contained in the NginxProxy resource. This is applied globally to all Gateways managed by this instance of NGINX Gateway Fabric. | object | `{}` |
269-
| `nginx.container` | The container configuration for the NGINX container. This is applied globally to all Gateways managed by this instance of NGINX Gateway Fabric. | object | `{"hostPorts":[],"lifecycle":{},"resources":{},"volumeMounts":[]}` |
269+
| `nginx.container` | The container configuration for the NGINX container. This is applied globally to all Gateways managed by this instance of NGINX Gateway Fabric. | object | `{"hostPorts":[],"lifecycle":{},"readinessProbe":{},"resources":{},"volumeMounts":[]}` |
270270
| `nginx.container.hostPorts` | A list of HostPorts to expose on the host. This configuration allows containers to bind to a specific port on the host node, enabling external network traffic to reach the container directly through the host's IP address and port. Use this option when you need to expose container ports on the host for direct access, such as for debugging, legacy integrations, or when NodePort/LoadBalancer services are not suitable. Note: Using hostPort may have security and scheduling implications, as it ties pods to specific nodes and ports. | list | `[]` |
271271
| `nginx.container.lifecycle` | The lifecycle of the NGINX container. | object | `{}` |
272272
| `nginx.container.resources` | The resource requirements of the NGINX container. | object | `{}` |

charts/nginx-gateway-fabric/values.schema.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,12 @@
351351
"title": "lifecycle",
352352
"type": "object"
353353
},
354+
"readinessProbe": {
355+
"description": "# -- Defines the settings for the data plane readiness probe. This probe returns Ready when the NGINX data plane is ready to serve traffic.",
356+
"required": [],
357+
"title": "readinessProbe",
358+
"type": "object"
359+
},
354360
"resources": {
355361
"description": "The resource requirements of the NGINX container.",
356362
"required": [],

charts/nginx-gateway-fabric/values.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,19 @@ nginx:
441441
# -- volumeMounts are the additional volume mounts for the NGINX container.
442442
volumeMounts: []
443443

444+
## -- Defines the settings for the data plane readiness probe. This probe returns Ready when the NGINX data plane is ready to serve traffic.
445+
readinessProbe: {}
446+
# @schema
447+
# type: integer
448+
# minimum: 1
449+
# maximum: 65535
450+
# @schema
451+
# -- Port in which the readiness endpoint is exposed.
452+
# port: 8081
453+
454+
# -- The number of seconds after the Pod has started before the readiness probes are initiated.
455+
# initialDelaySeconds: 3
456+
444457
# -- The service configuration for the NGINX data plane. This is applied globally to all Gateways managed by this
445458
# instance of NGINX Gateway Fabric.
446459
service:

config/crd/bases/gateway.nginx.org_nginxproxies.yaml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,28 @@ spec:
362362
StopSignal can only be set for Pods with a non-empty .spec.os.name
363363
type: string
364364
type: object
365+
readinessProbe:
366+
description: ReadinessProbe defines the readiness probe
367+
for the NGINX container.
368+
properties:
369+
initialDelaySeconds:
370+
description: |-
371+
InitialDelaySeconds is the number of seconds after the container has
372+
started before the readiness probe is initiated.
373+
If not specified, the default is 3 seconds.
374+
format: int32
375+
maximum: 3600
376+
minimum: 0
377+
type: integer
378+
port:
379+
description: |-
380+
Port is the port on which the readiness endpoint is exposed.
381+
If not specified, the default port is 8081.
382+
format: int32
383+
maximum: 65535
384+
minimum: 1
385+
type: integer
386+
type: object
365387
resources:
366388
description: Resources describes the compute resource
367389
requirements.
@@ -3773,6 +3795,28 @@ spec:
37733795
StopSignal can only be set for Pods with a non-empty .spec.os.name
37743796
type: string
37753797
type: object
3798+
readinessProbe:
3799+
description: ReadinessProbe defines the readiness probe
3800+
for the NGINX container.
3801+
properties:
3802+
initialDelaySeconds:
3803+
description: |-
3804+
InitialDelaySeconds is the number of seconds after the container has
3805+
started before the readiness probe is initiated.
3806+
If not specified, the default is 3 seconds.
3807+
format: int32
3808+
maximum: 3600
3809+
minimum: 0
3810+
type: integer
3811+
port:
3812+
description: |-
3813+
Port is the port on which the readiness endpoint is exposed.
3814+
If not specified, the default port is 8081.
3815+
format: int32
3816+
maximum: 65535
3817+
minimum: 1
3818+
type: integer
3819+
type: object
37763820
resources:
37773821
description: Resources describes the compute resource
37783822
requirements.

deploy/crds.yaml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -947,6 +947,28 @@ spec:
947947
StopSignal can only be set for Pods with a non-empty .spec.os.name
948948
type: string
949949
type: object
950+
readinessProbe:
951+
description: ReadinessProbe defines the readiness probe
952+
for the NGINX container.
953+
properties:
954+
initialDelaySeconds:
955+
description: |-
956+
InitialDelaySeconds is the number of seconds after the container has
957+
started before the readiness probe is initiated.
958+
If not specified, the default is 3 seconds.
959+
format: int32
960+
maximum: 3600
961+
minimum: 0
962+
type: integer
963+
port:
964+
description: |-
965+
Port is the port on which the readiness endpoint is exposed.
966+
If not specified, the default port is 8081.
967+
format: int32
968+
maximum: 65535
969+
minimum: 1
970+
type: integer
971+
type: object
950972
resources:
951973
description: Resources describes the compute resource
952974
requirements.
@@ -4358,6 +4380,28 @@ spec:
43584380
StopSignal can only be set for Pods with a non-empty .spec.os.name
43594381
type: string
43604382
type: object
4383+
readinessProbe:
4384+
description: ReadinessProbe defines the readiness probe
4385+
for the NGINX container.
4386+
properties:
4387+
initialDelaySeconds:
4388+
description: |-
4389+
InitialDelaySeconds is the number of seconds after the container has
4390+
started before the readiness probe is initiated.
4391+
If not specified, the default is 3 seconds.
4392+
format: int32
4393+
maximum: 3600
4394+
minimum: 0
4395+
type: integer
4396+
port:
4397+
description: |-
4398+
Port is the port on which the readiness endpoint is exposed.
4399+
If not specified, the default port is 8081.
4400+
format: int32
4401+
maximum: 65535
4402+
minimum: 1
4403+
type: integer
4404+
type: object
43614405
resources:
43624406
description: Resources describes the compute resource
43634407
requirements.

go.mod

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@ require (
1313
github.com/onsi/gomega v1.37.0
1414
github.com/prometheus/client_golang v1.22.0
1515
github.com/spf13/cobra v1.9.1
16-
github.com/spf13/pflag v1.0.6
17-
go.opentelemetry.io/otel v1.36.0
18-
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.36.0
16+
github.com/spf13/pflag v1.0.7
17+
go.opentelemetry.io/otel v1.37.0
18+
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.37.0
1919
go.uber.org/zap v1.27.0
20-
golang.org/x/text v0.25.0
21-
google.golang.org/grpc v1.72.2
20+
golang.org/x/text v0.27.0
21+
google.golang.org/grpc v1.74.0
2222
google.golang.org/protobuf v1.36.6
23-
k8s.io/api v0.33.2
24-
k8s.io/apiextensions-apiserver v0.33.2
25-
k8s.io/apimachinery v0.33.2
26-
k8s.io/client-go v0.33.2
23+
k8s.io/api v0.33.3
24+
k8s.io/apiextensions-apiserver v0.33.3
25+
k8s.io/apimachinery v0.33.3
26+
k8s.io/client-go v0.33.3
2727
k8s.io/klog/v2 v2.130.1
2828
sigs.k8s.io/controller-runtime v0.21.0
2929
sigs.k8s.io/gateway-api v1.3.0
@@ -48,12 +48,12 @@ require (
4848
github.com/google/btree v1.1.3 // indirect
4949
github.com/google/gnostic-models v0.6.9 // indirect
5050
github.com/google/pprof v0.0.0-20250423184734-337e5dd93bb4 // indirect
51-
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 // indirect
51+
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.1 // indirect
5252
github.com/inconshreveable/mousetrap v1.1.0 // indirect
5353
github.com/josharian/intern v1.0.0 // indirect
5454
github.com/json-iterator/go v1.1.12 // indirect
5555
github.com/mailru/easyjson v0.7.7 // indirect
56-
github.com/maxbrunsfeld/counterfeiter/v6 v6.11.2 // indirect
56+
github.com/maxbrunsfeld/counterfeiter/v6 v6.11.3 // indirect
5757
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
5858
github.com/modern-go/reflect2 v1.0.2 // indirect
5959
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
@@ -63,24 +63,24 @@ require (
6363
github.com/prometheus/procfs v0.16.0 // indirect
6464
github.com/x448/float16 v0.8.4 // indirect
6565
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
66-
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.36.0 // indirect
67-
go.opentelemetry.io/otel/metric v1.36.0 // indirect
68-
go.opentelemetry.io/otel/sdk v1.36.0 // indirect
69-
go.opentelemetry.io/otel/trace v1.36.0 // indirect
70-
go.opentelemetry.io/proto/otlp v1.6.0 // indirect
66+
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.37.0 // indirect
67+
go.opentelemetry.io/otel/metric v1.37.0 // indirect
68+
go.opentelemetry.io/otel/sdk v1.37.0 // indirect
69+
go.opentelemetry.io/otel/trace v1.37.0 // indirect
70+
go.opentelemetry.io/proto/otlp v1.7.0 // indirect
7171
go.uber.org/automaxprocs v1.6.0 // indirect
7272
go.uber.org/multierr v1.11.0 // indirect
73-
golang.org/x/mod v0.24.0 // indirect
74-
golang.org/x/net v0.40.0 // indirect
75-
golang.org/x/oauth2 v0.27.0 // indirect
76-
golang.org/x/sync v0.14.0 // indirect
77-
golang.org/x/sys v0.33.0 // indirect
78-
golang.org/x/term v0.32.0 // indirect
73+
golang.org/x/mod v0.26.0 // indirect
74+
golang.org/x/net v0.42.0 // indirect
75+
golang.org/x/oauth2 v0.30.0 // indirect
76+
golang.org/x/sync v0.16.0 // indirect
77+
golang.org/x/sys v0.34.0 // indirect
78+
golang.org/x/term v0.33.0 // indirect
7979
golang.org/x/time v0.9.0 // indirect
80-
golang.org/x/tools v0.32.0 // indirect
80+
golang.org/x/tools v0.35.0 // indirect
8181
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
82-
google.golang.org/genproto/googleapis/api v0.0.0-20250519155744-55703ea1f237 // indirect
83-
google.golang.org/genproto/googleapis/rpc v0.0.0-20250519155744-55703ea1f237 // indirect
82+
google.golang.org/genproto/googleapis/api v0.0.0-20250603155806-513f23925822 // indirect
83+
google.golang.org/genproto/googleapis/rpc v0.0.0-20250603155806-513f23925822 // indirect
8484
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
8585
gopkg.in/inf.v0 v0.9.1 // indirect
8686
gopkg.in/yaml.v3 v3.0.1 // indirect

0 commit comments

Comments
 (0)