You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Makefile
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -121,7 +121,7 @@ generate: ## Run go generate
121
121
122
122
.PHONY: generate-crds
123
123
generate-crds: ## Generate CRDs and Go types using kubebuilder
124
-
go run sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION) crd:maxDescLen=0 object paths=./apis/... output:crd:artifacts:config=config/crd/bases
124
+
go run sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION) crd object paths=./apis/... output:crd:artifacts:config=config/crd/bases
Copy file name to clipboardExpand all lines: apis/v1alpha2/nginxproxy_types.go
+9-2Lines changed: 9 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -418,6 +418,12 @@ type DaemonSetSpec struct {
418
418
ContainerContainerSpec`json:"container"`
419
419
}
420
420
421
+
// +kubebuilder:validation:XValidation:message="at least one metric must be specified when autoscaling is enabled",rule="!self.enabled || (has(self.targetCPUUtilizationPercentage) || has(self.targetMemoryUtilizationPercentage) || (has(self.autoscalingTemplate) && size(self.autoscalingTemplate) > 0))"
422
+
// +kubebuilder:validation:XValidation:message="minReplicas must be less than or equal to maxReplicas",rule="self.minReplicas <= self.maxReplicas"
423
+
// +kubebuilder:validation:XValidation:message="CPU utilization must be between 1 and 100",rule="!has(self.targetCPUUtilizationPercentage) || (self.targetCPUUtilizationPercentage >= 1 && self.targetCPUUtilizationPercentage <= 100)"
424
+
// +kubebuilder:validation:XValidation:message="memory utilization must be between 1 and 100",rule="!has(self.targetMemoryUtilizationPercentage) || (self.targetMemoryUtilizationPercentage >= 1 && self.targetMemoryUtilizationPercentage <= 100)"
425
+
//
426
+
//nolint:lll
421
427
typeHPASpecstruct {
422
428
// behavior configures the scaling behavior of the target
423
429
// in both Up and Down directions (scaleUp and scaleDown fields respectively).
@@ -446,13 +452,14 @@ type HPASpec struct {
446
452
// set by external tools to store and retrieve arbitrary metadata. They are not
447
453
// queryable and should be preserved when modifying objects.
448
454
// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations
Copy file name to clipboardExpand all lines: charts/nginx-gateway-fabric/README.md
+5-6Lines changed: 5 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -264,18 +264,16 @@ The following table lists the configurable parameters of the NGINX Gateway Fabri
264
264
| `certGenerator.ttlSecondsAfterFinished` | How long to wait after the cert generator job has finished before it is removed by the job controller. | int | `30` |
265
265
| `clusterDomain` | The DNS cluster domain of your Kubernetes cluster. | string | `"cluster.local"` |
266
266
| `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 | `{"autoscaling":{"behavior":{},"enabled":true,"hpaAnnotations":{},"maxReplicas":11,"minReplicas":1,"targetCPUUtilizationPercentage":50,"targetMemoryUtilizationPercentage":50},"autoscalingTemplate":[],"config":{},"container":{"resources":{}},"debug":false,"image":{"pullPolicy":"Always","repository":"ghcr.io/nginx/nginx-gateway-fabric/nginx","tag":"edge"},"imagePullSecret":"","imagePullSecrets":[],"kind":"deployment","plus":false,"pod":{"tolerations":[]},"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 | `{"autoscaling":{"enabled":false},"autoscalingTemplate":[],"config":{},"container":{},"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}}` |
268
268
| `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 | `{"resources":{}}` |
270
-
| `nginx.container.resources` | The resource requirements of the NGINX container. You should be set this value, If you want to use dataplane Autoscaling(HPA). | 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 | `{}` |
271
270
| `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` |
272
271
| `nginx.image.repository` | The NGINX image to use. | string | `"ghcr.io/nginx/nginx-gateway-fabric/nginx"` |
273
272
| `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 | `""` |
274
273
| `nginx.imagePullSecrets` | A list of secret names containing docker registry credentials. Secrets must exist in the same namespace as the helm release. The control plane will copy these secrets into any namespace where NGINX is deployed. | list | `[]` |
275
274
| `nginx.kind` | The kind of NGINX deployment. | string | `"deployment"` |
276
275
| `nginx.plus` | Is NGINX Plus image being used. | bool | `false` |
277
-
| `nginx.pod` | The pod configuration for the NGINX data plane pod. This is applied globally to all Gateways managed by this instance of NGINX Gateway Fabric. | object | `{"tolerations":[]}` |
278
-
| `nginx.pod.tolerations` | Tolerations for the NGINX data plane pod. | list | `[]` |
276
+
| `nginx.pod` | The pod configuration for the NGINX data plane pod. This is applied globally to all Gateways managed by this instance of NGINX Gateway Fabric. | object | `{}` |
279
277
| `nginx.replicas` | The number of replicas of the NGINX Deployment. | int | `1` |
280
278
| `nginx.service` | The service configuration for the NGINX data plane. This is applied globally to all Gateways managed by this instance of NGINX Gateway Fabric. | object | `{"externalTrafficPolicy":"Local","loadBalancerClass":"","loadBalancerIP":"","loadBalancerSourceRanges":[],"nodePorts":[],"type":"LoadBalancer"}` |
281
279
| `nginx.service.externalTrafficPolicy` | The externalTrafficPolicy of the service. The value Local preserves the client source IP. | string | `"Local"` |
@@ -290,7 +288,7 @@ The following table lists the configurable parameters of the NGINX Gateway Fabri
290
288
| `nginx.usage.resolver` | The nameserver used to resolve the NGINX Plus usage reporting endpoint. Used with NGINX Instance Manager. | string | `""` |
291
289
| `nginx.usage.secretName` | The name of the Secret containing the JWT for NGINX Plus usage reporting. Must exist in the same namespace that the NGINX Gateway Fabric control plane is running in (default namespace: nginx-gateway). | string | `"nplus-license"` |
292
290
| `nginx.usage.skipVerify` | Disable client verification of the NGINX Plus usage reporting server certificate. | bool | `false` |
293
-
| `nginxGateway` | The nginxGateway section contains configuration for the NGINX Gateway Fabric control plane deployment. | object | `{"affinity":{},"autoscaling":{"annotations":{},"behavior":{},"enabled":false,"maxReplicas":11,"minReplicas":1,"targetCPUUtilizationPercentage":50,"targetMemoryUtilizationPercentage":50},"autoscalingTemplate":[],"config":{"logging":{"level":"info"}},"configAnnotations":{},"extraVolumeMounts":[],"extraVolumes":[],"gatewayClassAnnotations":{},"gatewayClassName":"nginx","gatewayControllerName":"gateway.nginx.org/nginx-gateway-controller","gwAPIExperimentalFeatures":{"enable":false},"image":{"pullPolicy":"Always","repository":"ghcr.io/nginx/nginx-gateway-fabric","tag":"edge"},"kind":"deployment","labels":{},"leaderElection":{"enable":true,"lockName":""},"lifecycle":{},"metrics":{"enable":true,"port":9113,"secure":false},"nodeSelector":{},"podAnnotations":{},"productTelemetry":{"enable":true},"readinessProbe":{"enable":true,"initialDelaySeconds":3,"port":8081},"replicas":1,"resources":{},"service":{"annotations":{},"labels":{}},"serviceAccount":{"annotations":{},"imagePullSecret":"","imagePullSecrets":[],"name":""},"snippetsFilters":{"enable":false},"terminationGracePeriodSeconds":30,"tolerations":[],"topologySpreadConstraints":[]}` |
291
+
| `nginxGateway` | The nginxGateway section contains configuration for the NGINX Gateway Fabric control plane deployment. | object | `{"affinity":{},"autoscaling":{"enabled":false},"autoscalingTemplate":[],"config":{"logging":{"level":"info"}},"configAnnotations":{},"extraVolumeMounts":[],"extraVolumes":[],"gatewayClassAnnotations":{},"gatewayClassName":"nginx","gatewayControllerName":"gateway.nginx.org/nginx-gateway-controller","gwAPIExperimentalFeatures":{"enable":false},"image":{"pullPolicy":"Always","repository":"ghcr.io/nginx/nginx-gateway-fabric","tag":"edge"},"kind":"deployment","labels":{},"leaderElection":{"enable":true,"lockName":""},"lifecycle":{},"metrics":{"enable":true,"port":9113,"secure":false},"name":"","nodeSelector":{},"podAnnotations":{},"productTelemetry":{"enable":true},"readinessProbe":{"enable":true,"initialDelaySeconds":3,"port":8081},"replicas":1,"resources":{},"service":{"annotations":{},"labels":{}},"serviceAccount":{"annotations":{},"imagePullSecret":"","imagePullSecrets":[],"name":""},"snippetsFilters":{"enable":false},"terminationGracePeriodSeconds":30,"tolerations":[],"topologySpreadConstraints":[]}` |
294
292
| `nginxGateway.affinity` | The affinity of the NGINX Gateway Fabric control plane pod. | object | `{}` |
| `nginxGateway.configAnnotations` | Set of custom annotations for NginxGateway objects. | object | `{}` |
@@ -310,6 +308,7 @@ The following table lists the configurable parameters of the NGINX Gateway Fabri
310
308
| `nginxGateway.metrics.enable` | Enable exposing metrics in the Prometheus format. | bool | `true` |
311
309
| `nginxGateway.metrics.port` | Set the port where the Prometheus metrics are exposed. | int | `9113` |
312
310
| `nginxGateway.metrics.secure` | Enable serving metrics via https. By default metrics are served via http. Please note that this endpoint will be secured with a self-signed certificate. | bool | `false` |
311
+
| `nginxGateway.name` | The name of the NGINX Gateway Fabric deployment - if not present, then by default uses release name given during installation. | string | `""` |
313
312
| `nginxGateway.nodeSelector` | The nodeSelector of the NGINX Gateway Fabric control plane pod. | object | `{}` |
314
313
| `nginxGateway.podAnnotations` | Set of custom annotations for the NGINX Gateway Fabric pods. | object | `{}` |
315
314
| `nginxGateway.productTelemetry.enable` | Enable the collection of product telemetry. | bool | `true` |
Copy file name to clipboardExpand all lines: charts/nginx-gateway-fabric/values.schema.json
+8-88Lines changed: 8 additions & 88 deletions
Original file line number
Diff line number
Diff line change
@@ -100,46 +100,12 @@
100
100
"properties": {
101
101
"autoscaling": {
102
102
"properties": {
103
-
"behavior": {
104
-
"required": [],
105
-
"title": "behavior",
106
-
"type": "object"
107
-
},
108
103
"enabled": {
109
-
"default": true,
104
+
"default": false,
110
105
"description": "Enable or disable Horizontal Pod Autoscaler",
111
106
"required": [],
112
107
"title": "enabled",
113
108
"type": "boolean"
114
-
},
115
-
"hpaAnnotations": {
116
-
"required": [],
117
-
"title": "hpaAnnotations",
118
-
"type": "object"
119
-
},
120
-
"maxReplicas": {
121
-
"default": 11,
122
-
"required": [],
123
-
"title": "maxReplicas",
124
-
"type": "integer"
125
-
},
126
-
"minReplicas": {
127
-
"default": 1,
128
-
"required": [],
129
-
"title": "minReplicas",
130
-
"type": "integer"
131
-
},
132
-
"targetCPUUtilizationPercentage": {
133
-
"default": 50,
134
-
"required": [],
135
-
"title": "targetCPUUtilizationPercentage",
136
-
"type": "integer"
137
-
},
138
-
"targetMemoryUtilizationPercentage": {
139
-
"default": 50,
140
-
"required": [],
141
-
"title": "targetMemoryUtilizationPercentage",
142
-
"type": "integer"
143
109
}
144
110
},
145
111
"required": [],
@@ -369,14 +335,6 @@
369
335
},
370
336
"container": {
371
337
"description": "The container configuration for the NGINX container. This is applied globally to all Gateways managed by this\ninstance of NGINX Gateway Fabric.",
372
-
"properties": {
373
-
"resources": {
374
-
"description": "The resource requirements of the NGINX container. You should be set this value, If you want to use dataplane Autoscaling(HPA).",
375
-
"required": [],
376
-
"title": "resources",
377
-
"type": "object"
378
-
}
379
-
},
380
338
"required": [],
381
339
"title": "container",
382
340
"type": "object"
@@ -454,17 +412,6 @@
454
412
},
455
413
"pod": {
456
414
"description": "The pod configuration for the NGINX data plane pod. This is applied globally to all Gateways managed by this\ninstance of NGINX Gateway Fabric.",
457
-
"properties": {
458
-
"tolerations": {
459
-
"description": "Tolerations for the NGINX data plane pod.",
460
-
"items": {
461
-
"required": []
462
-
},
463
-
"required": [],
464
-
"title": "tolerations",
465
-
"type": "array"
466
-
}
467
-
},
468
415
"required": [],
469
416
"title": "pod",
470
417
"type": "object"
@@ -618,46 +565,12 @@
618
565
},
619
566
"autoscaling": {
620
567
"properties": {
621
-
"annotations": {
622
-
"required": [],
623
-
"title": "annotations",
624
-
"type": "object"
625
-
},
626
-
"behavior": {
627
-
"required": [],
628
-
"title": "behavior",
629
-
"type": "object"
630
-
},
631
568
"enabled": {
632
569
"default": false,
633
570
"description": "Enable or disable Horizontal Pod Autoscaler",
634
571
"required": [],
635
572
"title": "enabled",
636
573
"type": "boolean"
637
-
},
638
-
"maxReplicas": {
639
-
"default": 11,
640
-
"required": [],
641
-
"title": "maxReplicas",
642
-
"type": "integer"
643
-
},
644
-
"minReplicas": {
645
-
"default": 1,
646
-
"required": [],
647
-
"title": "minReplicas",
648
-
"type": "integer"
649
-
},
650
-
"targetCPUUtilizationPercentage": {
651
-
"default": 50,
652
-
"required": [],
653
-
"title": "targetCPUUtilizationPercentage",
654
-
"type": "integer"
655
-
},
656
-
"targetMemoryUtilizationPercentage": {
657
-
"default": 50,
658
-
"required": [],
659
-
"title": "targetMemoryUtilizationPercentage",
660
-
"type": "integer"
661
574
}
662
575
},
663
576
"required": [],
@@ -858,6 +771,13 @@
858
771
"title": "metrics",
859
772
"type": "object"
860
773
},
774
+
"name": {
775
+
"default": "",
776
+
"description": "The name of the NGINX Gateway Fabric deployment - if not present, then by default uses release name given during installation.",
777
+
"required": [],
778
+
"title": "name",
779
+
"type": "string"
780
+
},
861
781
"nodeSelector": {
862
782
"description": "The nodeSelector of the NGINX Gateway Fabric control plane pod.",
0 commit comments