Skip to content

Commit

Permalink
Drop old autoscaling api code (#590)
Browse files Browse the repository at this point in the history
Signed-off-by: Mikkel Oscar Lyderik Larsen <[email protected]>
  • Loading branch information
mikkeloscar authored Feb 20, 2024
1 parent 9e24210 commit 5e8d42c
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 165 deletions.
8 changes: 4 additions & 4 deletions cmd/e2e/generated_autoscaler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/stretchr/testify/require"
zv1 "github.com/zalando-incubator/stackset-controller/pkg/apis/zalando.org/v1"
"k8s.io/api/autoscaling/v2beta1"
v2 "k8s.io/api/autoscaling/v2"
"k8s.io/apimachinery/pkg/api/resource"
)

Expand Down Expand Up @@ -55,12 +55,12 @@ func TestGenerateAutoscaler(t *testing.T) {
require.EqualValues(t, 10, hpa.Spec.MaxReplicas)
require.Len(t, hpa.Spec.Metrics, 3)
metric1 := hpa.Spec.Metrics[0]
require.EqualValues(t, metric1.Type, v2beta1.ExternalMetricSourceType)
require.EqualValues(t, metric1.Type, v2.ExternalMetricSourceType)
require.EqualValues(t, metric1.External.Target.AverageValue.Value(), 10)
metric2 := hpa.Spec.Metrics[1]
require.EqualValues(t, v2beta1.ObjectMetricSourceType, metric2.Type)
require.EqualValues(t, v2.ObjectMetricSourceType, metric2.Type)
require.EqualValues(t, 20, metric2.Object.Target.AverageValue.Value())
metric3 := hpa.Spec.Metrics[2]
require.EqualValues(t, v2beta1.ResourceMetricSourceType, metric3.Type)
require.EqualValues(t, v2.ResourceMetricSourceType, metric3.Type)
require.EqualValues(t, 50, *metric3.Resource.Target.AverageUtilization)
}
28 changes: 14 additions & 14 deletions docs/stack_crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7045,20 +7045,6 @@ spec:
description: key is the key to project.
type: string
mode:
description: 'mode is Optional:
mode bits used to set permissions
on this file. Must be an octal
value between 0000 and 0777 or
a decimal value between 0 and
511. YAML accepts both octal and
decimal values, JSON requires
decimal values for mode bits.
If not specified, the volume defaultMode
will be used. This might be in
conflict with other options that
affect the file mode, like fsGroup,
and the result can be other mode
bits set.'
format: int32
type: integer
path:
Expand Down Expand Up @@ -7191,6 +7177,20 @@ spec:
description: key is the key to project.
type: string
mode:
description: 'mode is Optional:
mode bits used to set permissions
on this file. Must be an octal
value between 0000 and 0777 or
a decimal value between 0 and
511. YAML accepts both octal and
decimal values, JSON requires
decimal values for mode bits.
If not specified, the volume defaultMode
will be used. This might be in
conflict with other options that
affect the file mode, like fsGroup,
and the result can be other mode
bits set.'
format: int32
type: integer
path:
Expand Down
92 changes: 0 additions & 92 deletions pkg/core/conversion.go

This file was deleted.

55 changes: 0 additions & 55 deletions pkg/core/generated.conversion.go

This file was deleted.

0 comments on commit 5e8d42c

Please sign in to comment.