Skip to content

Commit 5dd1fd8

Browse files
committed
remove probe struct and honor only port and initialDelaySeconds
1 parent a48dbf0 commit 5dd1fd8

File tree

19 files changed

+72
-698
lines changed

19 files changed

+72
-698
lines changed

apis/v1alpha2/nginxproxy_types.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -508,15 +508,18 @@ type ReadinessProbeSpec struct {
508508
// If not specified, the default port is 8081.
509509
//
510510
// +optional
511-
// +kubebuilder:default:=8081
512511
// +kubebuilder:validation:Minimum=1
513512
// +kubebuilder:validation:Maximum=65535
514513
Port *int32 `json:"port,omitempty"`
515514

516-
// Probe describes the Kubernetes Probe configuration.
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.
517518
//
518519
// +optional
519-
*corev1.Probe `json:",inline"`
520+
// +kubebuilder:validation:Minimum=0
521+
// +kubebuilder:validation:Maximum=3600
522+
InitialDelaySeconds *int32 `json:"initialDelaySeconds,omitempty"`
520523
}
521524

522525
// Image is the NGINX image to use.

apis/v1alpha2/zz_generated.deepcopy.go

Lines changed: 11 additions & 11 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":{},"readinessProbe":{},"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/templates/nginxproxy.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ spec:
2626
{{- end }}
2727
image:
2828
{{- toYaml .Values.nginx.image | nindent 10 }}
29-
readinessProbe:
30-
{{- toYaml .Values.nginx.readinessProbe | nindent 10 }}
3129
{{- if .Values.nginx.debug }}
3230
debug: {{ .Values.nginx.debug }}
3331
{{- end }}
@@ -50,8 +48,6 @@ spec:
5048
{{- if .Values.nginx.debug }}
5149
debug: {{ .Values.nginx.debug }}
5250
{{- end }}
53-
readinessProbe:
54-
{{- toYaml .Values.nginx.readinessProbe | nindent 10 }}
5551
{{- end }}
5652
{{- if .Values.nginx.service }}
5753
service:

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

Lines changed: 6 additions & 6 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": [],
@@ -447,12 +453,6 @@
447453
"title": "pod",
448454
"type": "object"
449455
},
450-
"readinessProbe": {
451-
"description": "# Defines the settings for the data plane readiness probe. This probe returns Ready when the NGINX data plane is ready to serve traffic.",
452-
"required": [],
453-
"title": "readinessProbe",
454-
"type": "object"
455-
},
456456
"replicas": {
457457
"default": 1,
458458
"description": "The number of replicas of the NGINX Deployment.",

charts/nginx-gateway-fabric/values.yaml

Lines changed: 13 additions & 12 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:
@@ -493,18 +506,6 @@ nginx:
493506
# - port: 30025
494507
# listenerPort: 80
495508

496-
## Defines the settings for the data plane readiness probe. This probe returns Ready when the NGINX data plane is ready to serve traffic.
497-
readinessProbe: {}
498-
# @schema
499-
# type: integer
500-
# minimum: 1
501-
# maximum: 65535
502-
# @schema
503-
# -- Port in which the readiness endpoint is exposed.
504-
# port: 8081
505-
506-
# The Kubernetes probe can also be configured by modifying the NginxProxy resource.
507-
508509
# -- Enable debugging for NGINX. Uses the nginx-debug binary. The NGINX error log level should be set to debug in the NginxProxy resource.
509510
debug: false
510511

0 commit comments

Comments
 (0)