Skip to content

Commit f84d3be

Browse files
committed
fix: kubebuilder
1 parent 94fa1c3 commit f84d3be

File tree

6 files changed

+79
-61
lines changed

6 files changed

+79
-61
lines changed

apis/v1alpha2/nginxproxy_types.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -604,25 +604,25 @@ const (
604604
// automatically if required. The default NodePort range enforced by Kubernetes is 30000-32767.
605605
type NodePort struct {
606606
// Port is the NodePort to expose.
607-
// kubebuilder:validation:Minimum=1
608-
// kubebuilder:validation:Maximum=65535
607+
// +kubebuilder:validation:Minimum=1
608+
// +kubebuilder:validation:Maximum=65535
609609
Port int32 `json:"port"`
610610

611611
// ListenerPort is the Gateway listener port that this NodePort maps to.
612-
// kubebuilder:validation:Minimum=1
613-
// kubebuilder:validation:Maximum=65535
612+
// +kubebuilder:validation:Minimum=1
613+
// +kubebuilder:validation:Maximum=65535
614614
ListenerPort int32 `json:"listenerPort"`
615615
}
616616

617617
// HostPort exposes an nginx container port on the host.
618618
type HostPort struct {
619619
// Port to expose on the host.
620-
// kubebuilder:validation:Minimum=1
621-
// kubebuilder:validation:Maximum=65535
620+
// +kubebuilder:validation:Minimum=1
621+
// +kubebuilder:validation:Maximum=65535
622622
Port int32 `json:"port"`
623623

624624
// ContainerPort is the port on the nginx container to map to the HostPort.
625-
// kubebuilder:validation:Minimum=1
626-
// kubebuilder:validation:Maximum=65535
625+
// +kubebuilder:validation:Minimum=1
626+
// +kubebuilder:validation:Maximum=65535
627627
ContainerPort int32 `json:"containerPort"`
628628
}

charts/nginx-gateway-fabric/README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,10 +264,13 @@ 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":[]},"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":{"extraVolumeMounts":[],"hostPorts":[],"lifecycle":{},"resources":{}},"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":[]}` |
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 | `{"extraVolumeMounts":[],"hostPorts":[],"lifecycle":{},"resources":{}}` |
270+
| `nginx.container.extraVolumeMounts` | extraVolumeMounts are the additional volume mounts for the NGINX container. | list | `[]` |
270271
| `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 | `[]` |
272+
| `nginx.container.lifecycle` | The lifecycle of the NGINX container. | object | `{}` |
273+
| `nginx.container.resources` | The resource requirements of the NGINX container. | object | `{}` |
271274
| `nginx.debug` | Enable debugging for NGINX. Uses the nginx-debug binary. The NGINX error log level should be set to debug in the NginxProxy resource. | bool | `false` |
272275
| `nginx.image.repository` | The NGINX image to use. | string | `"ghcr.io/nginx/nginx-gateway-fabric/nginx"` |
273276
| `nginx.imagePullSecret` | The name of the secret containing docker registry credentials. Secret must exist in the same namespace as the helm release. The control plane will copy this secret into any namespace where NGINX is deployed. | string | `""` |

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

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,15 @@
314314
"container": {
315315
"description": "The container configuration for the NGINX container. This is applied globally to all Gateways managed by this\ninstance of NGINX Gateway Fabric.",
316316
"properties": {
317+
"extraVolumeMounts": {
318+
"description": "extraVolumeMounts are the additional volume mounts for the NGINX container.",
319+
"items": {
320+
"required": []
321+
},
322+
"required": [],
323+
"title": "extraVolumeMounts",
324+
"type": "array"
325+
},
317326
"hostPorts": {
318327
"description": "A list of HostPorts to expose on the host.\nThis configuration allows containers to bind to a specific port on the host node,\nenabling external network traffic to reach the container directly through the host's IP address and port.\nUse this option when you need to expose container ports on the host for direct access,\nsuch as for debugging, legacy integrations, or when NodePort/LoadBalancer services are not suitable.\nNote: Using hostPort may have security and scheduling implications, as it ties pods to specific nodes and ports.",
319328
"items": {
@@ -337,6 +346,18 @@
337346
"required": [],
338347
"title": "hostPorts",
339348
"type": "array"
349+
},
350+
"lifecycle": {
351+
"description": "The lifecycle of the NGINX container.",
352+
"required": [],
353+
"title": "lifecycle",
354+
"type": "object"
355+
},
356+
"resources": {
357+
"description": "The resource requirements of the NGINX container.",
358+
"required": [],
359+
"title": "resources",
360+
"type": "object"
340361
}
341362
},
342363
"required": [],

charts/nginx-gateway-fabric/values.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -430,13 +430,13 @@ nginx:
430430
# containerPort: 80
431431

432432
# -- The resource requirements of the NGINX container.
433-
# resources: {}
433+
resources: {}
434434

435435
# -- The lifecycle of the NGINX container.
436-
# lifecycle: {}
436+
lifecycle: {}
437437

438438
# -- extraVolumeMounts are the additional volume mounts for the NGINX container.
439-
# extraVolumeMounts: []
439+
extraVolumeMounts: []
440440

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

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

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -89,18 +89,17 @@ spec:
8989
on the host.
9090
properties:
9191
containerPort:
92-
description: |-
93-
ContainerPort is the port on the nginx container to map to the HostPort.
94-
kubebuilder:validation:Minimum=1
95-
kubebuilder:validation:Maximum=65535
92+
description: ContainerPort is the port on the nginx
93+
container to map to the HostPort.
9694
format: int32
95+
maximum: 65535
96+
minimum: 1
9797
type: integer
9898
port:
99-
description: |-
100-
Port to expose on the host.
101-
kubebuilder:validation:Minimum=1
102-
kubebuilder:validation:Maximum=65535
99+
description: Port to expose on the host.
103100
format: int32
101+
maximum: 65535
102+
minimum: 1
104103
type: integer
105104
required:
106105
- containerPort
@@ -3501,18 +3500,17 @@ spec:
35013500
on the host.
35023501
properties:
35033502
containerPort:
3504-
description: |-
3505-
ContainerPort is the port on the nginx container to map to the HostPort.
3506-
kubebuilder:validation:Minimum=1
3507-
kubebuilder:validation:Maximum=65535
3503+
description: ContainerPort is the port on the nginx
3504+
container to map to the HostPort.
35083505
format: int32
3506+
maximum: 65535
3507+
minimum: 1
35093508
type: integer
35103509
port:
3511-
description: |-
3512-
Port to expose on the host.
3513-
kubebuilder:validation:Minimum=1
3514-
kubebuilder:validation:Maximum=65535
3510+
description: Port to expose on the host.
35153511
format: int32
3512+
maximum: 65535
3513+
minimum: 1
35163514
type: integer
35173515
required:
35183516
- containerPort
@@ -6937,18 +6935,17 @@ spec:
69376935
automatically if required. The default NodePort range enforced by Kubernetes is 30000-32767.
69386936
properties:
69396937
listenerPort:
6940-
description: |-
6941-
ListenerPort is the Gateway listener port that this NodePort maps to.
6942-
kubebuilder:validation:Minimum=1
6943-
kubebuilder:validation:Maximum=65535
6938+
description: ListenerPort is the Gateway listener port
6939+
that this NodePort maps to.
69446940
format: int32
6941+
maximum: 65535
6942+
minimum: 1
69456943
type: integer
69466944
port:
6947-
description: |-
6948-
Port is the NodePort to expose.
6949-
kubebuilder:validation:Minimum=1
6950-
kubebuilder:validation:Maximum=65535
6945+
description: Port is the NodePort to expose.
69516946
format: int32
6947+
maximum: 65535
6948+
minimum: 1
69526949
type: integer
69536950
required:
69546951
- listenerPort

deploy/crds.yaml

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -674,18 +674,17 @@ spec:
674674
on the host.
675675
properties:
676676
containerPort:
677-
description: |-
678-
ContainerPort is the port on the nginx container to map to the HostPort.
679-
kubebuilder:validation:Minimum=1
680-
kubebuilder:validation:Maximum=65535
677+
description: ContainerPort is the port on the nginx
678+
container to map to the HostPort.
681679
format: int32
680+
maximum: 65535
681+
minimum: 1
682682
type: integer
683683
port:
684-
description: |-
685-
Port to expose on the host.
686-
kubebuilder:validation:Minimum=1
687-
kubebuilder:validation:Maximum=65535
684+
description: Port to expose on the host.
688685
format: int32
686+
maximum: 65535
687+
minimum: 1
689688
type: integer
690689
required:
691690
- containerPort
@@ -4086,18 +4085,17 @@ spec:
40864085
on the host.
40874086
properties:
40884087
containerPort:
4089-
description: |-
4090-
ContainerPort is the port on the nginx container to map to the HostPort.
4091-
kubebuilder:validation:Minimum=1
4092-
kubebuilder:validation:Maximum=65535
4088+
description: ContainerPort is the port on the nginx
4089+
container to map to the HostPort.
40934090
format: int32
4091+
maximum: 65535
4092+
minimum: 1
40944093
type: integer
40954094
port:
4096-
description: |-
4097-
Port to expose on the host.
4098-
kubebuilder:validation:Minimum=1
4099-
kubebuilder:validation:Maximum=65535
4095+
description: Port to expose on the host.
41004096
format: int32
4097+
maximum: 65535
4098+
minimum: 1
41014099
type: integer
41024100
required:
41034101
- containerPort
@@ -7522,18 +7520,17 @@ spec:
75227520
automatically if required. The default NodePort range enforced by Kubernetes is 30000-32767.
75237521
properties:
75247522
listenerPort:
7525-
description: |-
7526-
ListenerPort is the Gateway listener port that this NodePort maps to.
7527-
kubebuilder:validation:Minimum=1
7528-
kubebuilder:validation:Maximum=65535
7523+
description: ListenerPort is the Gateway listener port
7524+
that this NodePort maps to.
75297525
format: int32
7526+
maximum: 65535
7527+
minimum: 1
75307528
type: integer
75317529
port:
7532-
description: |-
7533-
Port is the NodePort to expose.
7534-
kubebuilder:validation:Minimum=1
7535-
kubebuilder:validation:Maximum=65535
7530+
description: Port is the NodePort to expose.
75367531
format: int32
7532+
maximum: 65535
7533+
minimum: 1
75377534
type: integer
75387535
required:
75397536
- listenerPort

0 commit comments

Comments
 (0)