File tree Expand file tree Collapse file tree 9 files changed +7
-46
lines changed
charts/nginx-gateway-fabric
internal/controller/provisioner Expand file tree Collapse file tree 9 files changed +7
-46
lines changed Original file line number Diff line number Diff line change @@ -449,17 +449,8 @@ type HPASpec struct {
449
449
// +optional
450
450
TargetMemoryUtilizationPercentage * int32 `json:"targetMemoryUtilizationPercentage,omitempty"`
451
451
452
- // Annotation for Horizontal Pod Autoscaler
453
- // Annotations is an unstructured key value map stored with a resource that may be
454
- // set by external tools to store and retrieve arbitrary metadata. They are not
455
- // queryable and should be preserved when modifying objects.
456
- // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations
457
- //
458
- // +optional
459
- HPAAnnotations map [string ]string `json:"hpaAnnotations,omitempty"`
460
-
461
452
// Minimum number of replicas.
462
- MinReplicas int32 `json:"minReplicas"`
453
+ MinReplicas * int32 `json:"minReplicas"`
463
454
464
455
// Maximum number of replicas.
465
456
MaxReplicas int32 `json:"maxReplicas"`
Original file line number Diff line number Diff line change 18
18
{{- if .Values.nginx.autoscaling.enabled }}
19
19
autoscaling :
20
20
enabled : {{ .Values.nginx.autoscaling.enabled }}
21
- {{- if .Values.nginx.autoscaling.hpaAnnotations }}
22
- hpaAnnotations :
23
- {{- toYaml .Values.nginx.autoscaling.hpaAnnotations | nindent 10 }}
24
- {{- end }}
25
21
minReplicas : {{ .Values.nginx.autoscaling.minReplicas }}
26
22
maxReplicas : {{ .Values.nginx.autoscaling.maxReplicas }}
27
23
{{- if .Values.nginx.autoscaling.targetCPUUtilizationPercentage }}
Original file line number Diff line number Diff line change @@ -234,7 +234,6 @@ nginx:
234
234
autoscaling :
235
235
# Enable or disable Horizontal Pod Autoscaler
236
236
enabled : false
237
- # hpaAnnotations: {}
238
237
# minReplicas: 1
239
238
# maxReplicas: 11
240
239
# targetCPUUtilizationPercentage: 50
Original file line number Diff line number Diff line change @@ -4101,16 +4101,6 @@ spec:
4101
4101
enabled:
4102
4102
description: Enable or disable Horizontal Pod Autoscaler
4103
4103
type: boolean
4104
- hpaAnnotations:
4105
- additionalProperties:
4106
- type: string
4107
- description: |-
4108
- Annotation for Horizontal Pod Autoscaler
4109
- Annotations is an unstructured key value map stored with a resource that may be
4110
- set by external tools to store and retrieve arbitrary metadata. They are not
4111
- queryable and should be preserved when modifying objects.
4112
- More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations
4113
- type: object
4114
4104
maxReplicas:
4115
4105
description: Maximum number of replicas.
4116
4106
format: int32
Original file line number Diff line number Diff line change @@ -4686,16 +4686,6 @@ spec:
4686
4686
enabled:
4687
4687
description: Enable or disable Horizontal Pod Autoscaler
4688
4688
type: boolean
4689
- hpaAnnotations:
4690
- additionalProperties:
4691
- type: string
4692
- description: |-
4693
- Annotation for Horizontal Pod Autoscaler
4694
- Annotations is an unstructured key value map stored with a resource that may be
4695
- set by external tools to store and retrieve arbitrary metadata. They are not
4696
- queryable and should be preserved when modifying objects.
4697
- More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations
4698
- type: object
4699
4689
maxReplicas:
4700
4690
description: Maximum number of replicas.
4701
4691
format: int32
Original file line number Diff line number Diff line change @@ -81,7 +81,6 @@ func newEventLoop(
81
81
k8spredicate .And (
82
82
k8spredicate.GenerationChangedPredicate {},
83
83
nginxResourceLabelPredicate ,
84
- predicate.RestartDeploymentAnnotationPredicate {},
85
84
),
86
85
),
87
86
},
Original file line number Diff line number Diff line change @@ -943,8 +943,6 @@ func buildNginxDeploymentHPA(
943
943
objectMeta metav1.ObjectMeta ,
944
944
autoScaling ngfAPIv1alpha2.HPASpec ,
945
945
) * autoscalingv2.HorizontalPodAutoscaler {
946
- objectMeta .Annotations = autoScaling .HPAAnnotations
947
-
948
946
if ! autoScaling .Enabled {
949
947
return nil
950
948
}
@@ -1002,7 +1000,7 @@ func buildNginxDeploymentHPA(
1002
1000
Kind : "Deployment" ,
1003
1001
Name : objectMeta .Name ,
1004
1002
},
1005
- MinReplicas : & autoScaling .MinReplicas ,
1003
+ MinReplicas : autoScaling .MinReplicas ,
1006
1004
MaxReplicas : autoScaling .MaxReplicas ,
1007
1005
Metrics : metrics ,
1008
1006
Behavior : autoScaling .Behavior ,
Original file line number Diff line number Diff line change @@ -282,7 +282,7 @@ func TestBuildNginxResourceObjects_NginxProxyConfig(t *testing.T) {
282
282
Replicas : helpers.GetPointer [int32 ](3 ),
283
283
Autoscaling : ngfAPIv1alpha2.HPASpec {
284
284
Enabled : true ,
285
- MinReplicas : 1 ,
285
+ MinReplicas : helpers. GetPointer [ int32 ]( 1 ) ,
286
286
MaxReplicas : 5 ,
287
287
TargetMemoryUtilizationPercentage : helpers.GetPointer [int32 ](60 ),
288
288
},
You can’t perform that action at this time.
0 commit comments