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 {
449449 // +optional
450450 TargetMemoryUtilizationPercentage * int32 `json:"targetMemoryUtilizationPercentage,omitempty"`
451451
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-
461452 // Minimum number of replicas.
462- MinReplicas int32 `json:"minReplicas"`
453+ MinReplicas * int32 `json:"minReplicas"`
463454
464455 // Maximum number of replicas.
465456 MaxReplicas int32 `json:"maxReplicas"`
Original file line number Diff line number Diff line change 1818 {{- if .Values.nginx.autoscaling.enabled }}
1919 autoscaling :
2020 enabled : {{ .Values.nginx.autoscaling.enabled }}
21- {{- if .Values.nginx.autoscaling.hpaAnnotations }}
22- hpaAnnotations :
23- {{- toYaml .Values.nginx.autoscaling.hpaAnnotations | nindent 10 }}
24- {{- end }}
2521 minReplicas : {{ .Values.nginx.autoscaling.minReplicas }}
2622 maxReplicas : {{ .Values.nginx.autoscaling.maxReplicas }}
2723 {{- if .Values.nginx.autoscaling.targetCPUUtilizationPercentage }}
Original file line number Diff line number Diff line change @@ -234,7 +234,6 @@ nginx:
234234 autoscaling :
235235 # Enable or disable Horizontal Pod Autoscaler
236236 enabled : false
237- # hpaAnnotations: {}
238237 # minReplicas: 1
239238 # maxReplicas: 11
240239 # targetCPUUtilizationPercentage: 50
Original file line number Diff line number Diff line change @@ -4101,16 +4101,6 @@ spec:
41014101 enabled:
41024102 description: Enable or disable Horizontal Pod Autoscaler
41034103 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
41144104 maxReplicas:
41154105 description: Maximum number of replicas.
41164106 format: int32
Original file line number Diff line number Diff line change @@ -4686,16 +4686,6 @@ spec:
46864686 enabled:
46874687 description: Enable or disable Horizontal Pod Autoscaler
46884688 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
46994689 maxReplicas:
47004690 description: Maximum number of replicas.
47014691 format: int32
Original file line number Diff line number Diff line change @@ -81,7 +81,6 @@ func newEventLoop(
8181 k8spredicate .And (
8282 k8spredicate.GenerationChangedPredicate {},
8383 nginxResourceLabelPredicate ,
84- predicate.RestartDeploymentAnnotationPredicate {},
8584 ),
8685 ),
8786 },
Original file line number Diff line number Diff line change @@ -943,8 +943,6 @@ func buildNginxDeploymentHPA(
943943 objectMeta metav1.ObjectMeta ,
944944 autoScaling ngfAPIv1alpha2.HPASpec ,
945945) * autoscalingv2.HorizontalPodAutoscaler {
946- objectMeta .Annotations = autoScaling .HPAAnnotations
947-
948946 if ! autoScaling .Enabled {
949947 return nil
950948 }
@@ -1002,7 +1000,7 @@ func buildNginxDeploymentHPA(
10021000 Kind : "Deployment" ,
10031001 Name : objectMeta .Name ,
10041002 },
1005- MinReplicas : & autoScaling .MinReplicas ,
1003+ MinReplicas : autoScaling .MinReplicas ,
10061004 MaxReplicas : autoScaling .MaxReplicas ,
10071005 Metrics : metrics ,
10081006 Behavior : autoScaling .Behavior ,
Original file line number Diff line number Diff line change @@ -282,7 +282,7 @@ func TestBuildNginxResourceObjects_NginxProxyConfig(t *testing.T) {
282282 Replicas : helpers.GetPointer [int32 ](3 ),
283283 Autoscaling : ngfAPIv1alpha2.HPASpec {
284284 Enabled : true ,
285- MinReplicas : 1 ,
285+ MinReplicas : helpers. GetPointer [ int32 ]( 1 ) ,
286286 MaxReplicas : 5 ,
287287 TargetMemoryUtilizationPercentage : helpers.GetPointer [int32 ](60 ),
288288 },
You can’t perform that action at this time.
0 commit comments