File tree Expand file tree Collapse file tree 4 files changed +13
-14
lines changed
charts/nginx-gateway-fabric
internal/controller/status Expand file tree Collapse file tree 4 files changed +13
-14
lines changed Original file line number Diff line number Diff line change 2
2
apiVersion : {{ ternary "autoscaling/v2" "autoscaling/v2beta2" (.Capabilities.APIVersions.Has "autoscaling/v2") }}
3
3
kind : HorizontalPodAutoscaler
4
4
metadata :
5
- {{- with .Values.autoscaling.annotations }}
5
+ {{- with .Values.nginxGateway. autoscaling.annotations }}
6
6
annotations : {{ toYaml . | nindent 4 }}
7
7
{{- end }}
8
8
labels :
@@ -17,18 +17,18 @@ spec:
17
17
apiVersion : apps/v1
18
18
kind : Deployment
19
19
name : {{ include "nginx-gateway.fullname" . }}
20
- minReplicas : {{ .Values.autoscaling.minReplicas }}
21
- maxReplicas : {{ .Values.autoscaling.maxReplicas }}
20
+ minReplicas : {{ .Values.nginxGateway. autoscaling.minReplicas }}
21
+ maxReplicas : {{ .Values.nginxGateway. autoscaling.maxReplicas }}
22
22
metrics :
23
- {{- with .Values.autoscaling.targetMemoryUtilizationPercentage }}
23
+ {{- with .Values.nginxGateway. autoscaling.targetMemoryUtilizationPercentage }}
24
24
- type : Resource
25
25
resource :
26
26
name : memory
27
27
target :
28
28
type : Utilization
29
29
averageUtilization : {{ . }}
30
30
{{- end }}
31
- {{- with .Values.autoscaling.targetCPUUtilizationPercentage }}
31
+ {{- with .Values.nginxGateway. autoscaling.targetCPUUtilizationPercentage }}
32
32
- type : Resource
33
33
resource :
34
34
name : cpu
39
39
{{- with .Values.autoscalingTemplate }}
40
40
{{- toYaml . | nindent 2 }}
41
41
{{- end }}
42
- {{- with .Values.autoscaling.behavior }}
42
+ {{- with .Values.nginxGateway. autoscaling.behavior }}
43
43
behavior :
44
44
{{- toYaml . | nindent 4 }}
45
45
{{- end }}
Original file line number Diff line number Diff line change @@ -157,6 +157,7 @@ nginxGateway:
157
157
topologySpreadConstraints : []
158
158
159
159
autoscaling :
160
+ # Enable or disable Horizontal Pod Autoscaler
160
161
enabled : false
161
162
annotations : {}
162
163
minReplicas : 1
@@ -252,8 +253,6 @@ nginx:
252
253
# plane will copy these secrets into any namespace where NGINX is deployed.
253
254
imagePullSecrets : []
254
255
255
- resources : {}
256
-
257
256
# Configuration for NGINX Plus usage reporting.
258
257
usage :
259
258
# -- The name of the Secret containing the JWT for NGINX Plus usage reporting. Must exist in the same namespace
Original file line number Diff line number Diff line change @@ -103,11 +103,11 @@ func removeDuplicateIndexParentRefs(parentRefs []graph.ParentRef) []graph.Parent
103
103
idxToParentRef [ref .Idx ] = append (idxToParentRef [ref .Idx ], ref )
104
104
}
105
105
106
- results := make ([]graph.ParentRef , len (idxToParentRef ))
106
+ results := make ([]graph.ParentRef , 0 , len (idxToParentRef ))
107
107
108
108
for idx , refs := range idxToParentRef {
109
109
if len (refs ) == 1 {
110
- results [ idx ] = refs [0 ]
110
+ results = append ( results , refs [0 ])
111
111
continue
112
112
}
113
113
@@ -124,7 +124,7 @@ func removeDuplicateIndexParentRefs(parentRefs []graph.ParentRef) []graph.Parent
124
124
}
125
125
}
126
126
}
127
- results [ idx ] = winningParentRef
127
+ results = append ( results , winningParentRef )
128
128
}
129
129
130
130
return results
Original file line number Diff line number Diff line change @@ -445,7 +445,7 @@ func TestBuildHTTPRouteStatuses(t *testing.T) {
445
445
446
446
err := k8sClient .Get (context .Background (), nsname , & hr )
447
447
g .Expect (err ).ToNot (HaveOccurred ())
448
- g .Expect (helpers . Diff ( expected , hr . Status )) .To (BeEmpty ( ))
448
+ g .Expect (expected . RouteStatus . Parents ) .To (ConsistOf ( hr . Status . Parents ))
449
449
}
450
450
}
451
451
@@ -524,7 +524,7 @@ func TestBuildGRPCRouteStatuses(t *testing.T) {
524
524
525
525
err := k8sClient .Get (context .Background (), nsname , & hr )
526
526
g .Expect (err ).ToNot (HaveOccurred ())
527
- g .Expect (helpers . Diff ( expected , hr . Status )) .To (BeEmpty ( ))
527
+ g .Expect (expected . RouteStatus . Parents ) .To (ConsistOf ( hr . Status . Parents ))
528
528
}
529
529
}
530
530
@@ -601,7 +601,7 @@ func TestBuildTLSRouteStatuses(t *testing.T) {
601
601
602
602
err := k8sClient .Get (context .Background (), nsname , & hr )
603
603
g .Expect (err ).ToNot (HaveOccurred ())
604
- g .Expect (helpers . Diff ( expected , hr . Status )) .To (BeEmpty ( ))
604
+ g .Expect (expected . RouteStatus . Parents ) .To (ConsistOf ( hr . Status . Parents ))
605
605
}
606
606
}
607
607
You can’t perform that action at this time.
0 commit comments