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: apis/v1alpha2/nginxproxy_types.go
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -466,6 +466,12 @@ type DaemonSetSpec struct {
466
466
Patches []Patch`json:"patches,omitempty"`
467
467
}
468
468
469
+
// +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))"
470
+
// +kubebuilder:validation:XValidation:message="minReplicas must be less than or equal to maxReplicas",rule="self.minReplicas <= self.maxReplicas"
471
+
// +kubebuilder:validation:XValidation:message="CPU utilization must be between 1 and 100",rule="!has(self.targetCPUUtilizationPercentage) || (self.targetCPUUtilizationPercentage >= 1 && self.targetCPUUtilizationPercentage <= 100)"
472
+
// +kubebuilder:validation:XValidation:message="memory utilization must be between 1 and 100",rule="!has(self.targetMemoryUtilizationPercentage) || (self.targetMemoryUtilizationPercentage >= 1 && self.targetMemoryUtilizationPercentage <= 100)"
473
+
//
474
+
//nolint:lll
469
475
typeHPASpecstruct {
470
476
// Behavior configures the scaling behavior of the target
471
477
// in both Up and Down directions (scaleUp and scaleDown fields respectively).
Copy file name to clipboardExpand all lines: charts/nginx-gateway-fabric/values.schema.json
+4-69Lines changed: 4 additions & 69 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": [],
@@ -376,6 +342,7 @@
376
342
},
377
343
"container": {
378
344
"description": "The container configuration for the NGINX container. This is applied globally to all Gateways managed by this\ninstance of NGINX Gateway Fabric.",
345
+
<<<<<<< HEAD
379
346
"properties": {
380
347
"hostPorts": {
381
348
"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.",
@@ -429,6 +396,8 @@
429
396
"type": "array"
430
397
}
431
398
},
399
+
=======
400
+
>>>>>>> Code Review
432
401
"required": [],
433
402
"title": "container",
434
403
"type": "object"
@@ -659,46 +628,12 @@
659
628
},
660
629
"autoscaling": {
661
630
"properties": {
662
-
"annotations": {
663
-
"required": [],
664
-
"title": "annotations",
665
-
"type": "object"
666
-
},
667
-
"behavior": {
668
-
"required": [],
669
-
"title": "behavior",
670
-
"type": "object"
671
-
},
672
631
"enabled": {
673
632
"default": false,
674
633
"description": "Enable or disable Horizontal Pod Autoscaler",
0 commit comments