@@ -46,21 +46,6 @@ const (
46
46
47
47
var emptyDirVolumeSource = corev1.VolumeSource {EmptyDir : & corev1.EmptyDirVolumeSource {}}
48
48
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
-
64
49
func (p * NginxProvisioner ) buildNginxResourceObjects (
65
50
resourceName string ,
66
51
gateway * gatewayv1.Gateway ,
@@ -1055,22 +1040,18 @@ func (p *NginxProvisioner) buildImage(nProxyCfg *graph.EffectiveNginxProxy) (str
1055
1040
return fmt .Sprintf ("%s:%s" , image , tag ), pullPolicy
1056
1041
}
1057
1042
1058
- func getMetricTargetByType (
1059
- target autoscalingv2.MetricTarget ,
1060
- ) autoscalingv2.MetricTarget {
1043
+ func getMetricTargetByType (target autoscalingv2.MetricTarget ) autoscalingv2.MetricTarget {
1061
1044
switch target .Type {
1062
1045
case autoscalingv2 .UtilizationMetricType :
1063
1046
return autoscalingv2.MetricTarget {
1064
1047
Type : autoscalingv2 .UtilizationMetricType ,
1065
1048
AverageUtilization : target .AverageUtilization ,
1066
1049
}
1067
-
1068
1050
case autoscalingv2 .AverageValueMetricType :
1069
1051
return autoscalingv2.MetricTarget {
1070
1052
Type : autoscalingv2 .AverageValueMetricType ,
1071
1053
AverageValue : target .AverageValue ,
1072
1054
}
1073
-
1074
1055
case autoscalingv2 .ValueMetricType :
1075
1056
return autoscalingv2.MetricTarget {
1076
1057
Type : autoscalingv2 .ValueMetricType ,
0 commit comments