Skip to content

Commit

Permalink
sched: manifests: v1beta2 -> v1beta3
Browse files Browse the repository at this point in the history
v1beta2 config is deprectated and on its way to removal.
For our goals, though, v1beta3 should be fully compatible
and little more than a trivial rename (if at all).
Let's start with the trivial rename.

Signed-off-by: Francesco Romani <[email protected]>
  • Loading branch information
ffromani committed Oct 30, 2023
1 parent d967eec commit b5cc716
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions pkg/manifests/schedparams_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func TestDecodeSchedulerConfigFromData(t *testing.T) {
},
{
name: "bad scheduler name",
data: []byte(`apiVersion: kubescheduler.config.k8s.io/v1beta2
data: []byte(`apiVersion: kubescheduler.config.k8s.io/v1beta3
kind: KubeSchedulerConfiguration
leaderElection:
leaderElect: false
Expand All @@ -65,7 +65,7 @@ profiles:
},
{
name: "bad scheduler params name",
data: []byte(`apiVersion: kubescheduler.config.k8s.io/v1beta2
data: []byte(`apiVersion: kubescheduler.config.k8s.io/v1beta3
kind: KubeSchedulerConfiguration
leaderElection:
leaderElect: false
Expand All @@ -90,7 +90,7 @@ profiles:
},
{
name: "empty params",
data: []byte(`apiVersion: kubescheduler.config.k8s.io/v1beta2
data: []byte(`apiVersion: kubescheduler.config.k8s.io/v1beta3
kind: KubeSchedulerConfiguration
leaderElection:
leaderElect: false
Expand Down Expand Up @@ -119,7 +119,7 @@ profiles:
},
{
name: "nonzero resync period",
data: []byte(`apiVersion: kubescheduler.config.k8s.io/v1beta2
data: []byte(`apiVersion: kubescheduler.config.k8s.io/v1beta3
kind: KubeSchedulerConfiguration
leaderElection:
leaderElect: false
Expand Down
2 changes: 1 addition & 1 deletion pkg/manifests/yaml/sched/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
namespace: tas-scheduler
data:
scheduler-config.yaml: |
apiVersion: kubescheduler.config.k8s.io/v1beta2
apiVersion: kubescheduler.config.k8s.io/v1beta3
kind: KubeSchedulerConfiguration
leaderElection:
leaderElect: false
Expand Down
16 changes: 8 additions & 8 deletions pkg/objectupdate/sched/render_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func TestRenderConfig(t *testing.T) {
},
},
initial: configTemplateAllValues,
expected: `apiVersion: kubescheduler.config.k8s.io/v1beta2
expected: `apiVersion: kubescheduler.config.k8s.io/v1beta3
kind: KubeSchedulerConfiguration
leaderElection:
leaderElect: false
Expand Down Expand Up @@ -105,7 +105,7 @@ profiles:
},
},
initial: configTemplateEmpty,
expected: `apiVersion: kubescheduler.config.k8s.io/v1beta2
expected: `apiVersion: kubescheduler.config.k8s.io/v1beta3
kind: KubeSchedulerConfiguration
leaderElection:
leaderElect: false
Expand Down Expand Up @@ -145,7 +145,7 @@ profiles:
ProfileName: "renamed-sched",
},
initial: configTemplateAllValuesMulti,
expected: `apiVersion: kubescheduler.config.k8s.io/v1beta2
expected: `apiVersion: kubescheduler.config.k8s.io/v1beta3
kind: KubeSchedulerConfiguration
leaderElection:
leaderElect: false
Expand Down Expand Up @@ -183,7 +183,7 @@ profiles:
},
},
initial: configTemplateAllValuesMulti,
expected: `apiVersion: kubescheduler.config.k8s.io/v1beta2
expected: `apiVersion: kubescheduler.config.k8s.io/v1beta3
kind: KubeSchedulerConfiguration
leaderElection:
leaderElect: false
Expand Down Expand Up @@ -239,7 +239,7 @@ profiles:
}
}

var configTemplateEmpty string = `apiVersion: kubescheduler.config.k8s.io/v1beta2
var configTemplateEmpty string = `apiVersion: kubescheduler.config.k8s.io/v1beta3
kind: KubeSchedulerConfiguration
leaderElection:
leaderElect: false
Expand All @@ -260,7 +260,7 @@ profiles:
schedulerName: test-sched-name
`

var configTemplateAllValues string = `apiVersion: kubescheduler.config.k8s.io/v1beta2
var configTemplateAllValues string = `apiVersion: kubescheduler.config.k8s.io/v1beta3
kind: KubeSchedulerConfiguration
leaderElection:
leaderElect: false
Expand All @@ -282,7 +282,7 @@ profiles:
schedulerName: test-sched-name
`

var configTemplateAllValuesMulti string = `apiVersion: kubescheduler.config.k8s.io/v1beta2
var configTemplateAllValuesMulti string = `apiVersion: kubescheduler.config.k8s.io/v1beta3
kind: KubeSchedulerConfiguration
leaderElection:
leaderElect: false
Expand Down Expand Up @@ -311,7 +311,7 @@ profiles:
schedulerName: test-sched-name
`

var configTemplateAllValuesMultiRenamed string = `apiVersion: kubescheduler.config.k8s.io/v1beta2
var configTemplateAllValuesMultiRenamed string = `apiVersion: kubescheduler.config.k8s.io/v1beta3
kind: KubeSchedulerConfiguration
leaderElection:
leaderElect: false
Expand Down

0 comments on commit b5cc716

Please sign in to comment.