@@ -46,21 +46,6 @@ const (
4646
4747var emptyDirVolumeSource = corev1.VolumeSource {EmptyDir : & corev1.EmptyDirVolumeSource {}}
4848
49- func autoscalingEnabled (dep * ngfAPIv1alpha2.DeploymentSpec ) bool {
50- return dep != nil && dep .Autoscaling .Enabled
51- }
52-
53- func cloneHPAAnnotationMap (src map [string ]string ) map [string ]string {
54- if src == nil {
55- return nil
56- }
57- annotations := make (map [string ]string , len (src ))
58- for k , v := range src {
59- annotations [k ] = v
60- }
61- return annotations
62- }
63-
6449func (p * NginxProvisioner ) buildNginxResourceObjects (
6550 resourceName string ,
6651 gateway * gatewayv1.Gateway ,
@@ -1055,22 +1040,18 @@ func (p *NginxProvisioner) buildImage(nProxyCfg *graph.EffectiveNginxProxy) (str
10551040 return fmt .Sprintf ("%s:%s" , image , tag ), pullPolicy
10561041}
10571042
1058- func getMetricTargetByType (
1059- target autoscalingv2.MetricTarget ,
1060- ) autoscalingv2.MetricTarget {
1043+ func getMetricTargetByType (target autoscalingv2.MetricTarget ) autoscalingv2.MetricTarget {
10611044 switch target .Type {
10621045 case autoscalingv2 .UtilizationMetricType :
10631046 return autoscalingv2.MetricTarget {
10641047 Type : autoscalingv2 .UtilizationMetricType ,
10651048 AverageUtilization : target .AverageUtilization ,
10661049 }
1067-
10681050 case autoscalingv2 .AverageValueMetricType :
10691051 return autoscalingv2.MetricTarget {
10701052 Type : autoscalingv2 .AverageValueMetricType ,
10711053 AverageValue : target .AverageValue ,
10721054 }
1073-
10741055 case autoscalingv2 .ValueMetricType :
10751056 return autoscalingv2.MetricTarget {
10761057 Type : autoscalingv2 .ValueMetricType ,
0 commit comments