Skip to content

Commit a12df90

Browse files
uzabanovdanail-branekov
authored andcommitted
Updating migration only for CFRoutes
Since the korifi 0.16.0 release adds labels, there is no need to touch the objects anymore, except the CFRoutes which have korifiv1alpha1.CFRouteAppGuidsAnnotationKey annotation added fixes #4123
1 parent 1d627b6 commit a12df90

File tree

3 files changed

+1
-84
lines changed

3 files changed

+1
-84
lines changed

migration/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import (
1717
func main() {
1818
err := korifiv1alpha1.AddToScheme(scheme.Scheme)
1919
if err != nil {
20-
panic(fmt.Sprintf("could not add CFApp to scheme: %v", err))
20+
panic(fmt.Sprintf("could not add to scheme: %v", err))
2121
}
2222

2323
k8sClientConfig := ctrl.GetConfigOrDie()

migration/migration/executor.go

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,7 @@ import (
1717
const MigratedByLabelKey = "korifi.cloudfoundry.org/migrated-by"
1818

1919
var korifiObjectLists = []client.ObjectList{
20-
&korifiv1alpha1.CFAppList{},
21-
&korifiv1alpha1.CFBuildList{},
22-
&korifiv1alpha1.CFDomainList{},
23-
&korifiv1alpha1.CFOrgList{},
24-
&korifiv1alpha1.CFPackageList{},
25-
&korifiv1alpha1.CFProcessList{},
2620
&korifiv1alpha1.CFRouteList{},
27-
&korifiv1alpha1.CFServiceBindingList{},
28-
&korifiv1alpha1.CFServiceBrokerList{},
29-
&korifiv1alpha1.CFServiceInstanceList{},
30-
&korifiv1alpha1.CFServiceOfferingList{},
31-
&korifiv1alpha1.CFServicePlanList{},
32-
&korifiv1alpha1.CFSpaceList{},
33-
&korifiv1alpha1.CFTaskList{},
3421
}
3522

3623
type Migrator struct {

migration/migration/executor_test.go

Lines changed: 0 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -11,44 +11,6 @@ import (
1111
)
1212

1313
var _ = Describe("Executor", func() {
14-
Describe("CFApp", test(&korifiv1alpha1.CFApp{
15-
Spec: korifiv1alpha1.CFAppSpec{
16-
DisplayName: "cfapp",
17-
DesiredState: "STOPPED",
18-
Lifecycle: korifiv1alpha1.Lifecycle{
19-
Type: "buildpack",
20-
},
21-
},
22-
}))
23-
24-
Describe("CFBuild", test(&korifiv1alpha1.CFBuild{
25-
Spec: korifiv1alpha1.CFBuildSpec{
26-
Lifecycle: korifiv1alpha1.Lifecycle{
27-
Type: "buildpack",
28-
},
29-
},
30-
}))
31-
32-
Describe("CFDomain", test(&korifiv1alpha1.CFDomain{
33-
Spec: korifiv1alpha1.CFDomainSpec{
34-
Name: "example.com",
35-
},
36-
}))
37-
38-
Describe("CFOrg", test(&korifiv1alpha1.CFOrg{
39-
Spec: korifiv1alpha1.CFOrgSpec{
40-
DisplayName: "example-org",
41-
},
42-
}))
43-
44-
Describe("CFPackage", test(&korifiv1alpha1.CFPackage{
45-
Spec: korifiv1alpha1.CFPackageSpec{
46-
Type: "bits",
47-
},
48-
}))
49-
50-
Describe("CFProcess", test(&korifiv1alpha1.CFProcess{}))
51-
5214
Describe("CFRoute", test(&korifiv1alpha1.CFRoute{
5315
Spec: korifiv1alpha1.CFRouteSpec{
5416
Host: "example",
@@ -58,38 +20,6 @@ var _ = Describe("Executor", func() {
5820
},
5921
},
6022
}))
61-
62-
Describe("CFServiceBinding", test(&korifiv1alpha1.CFServiceBinding{
63-
Spec: korifiv1alpha1.CFServiceBindingSpec{
64-
Type: "key",
65-
},
66-
}))
67-
68-
Describe("CFServiceBroker", test(&korifiv1alpha1.CFServiceBroker{}))
69-
70-
Describe("CFServiceInstance", test(&korifiv1alpha1.CFServiceInstance{
71-
Spec: korifiv1alpha1.CFServiceInstanceSpec{
72-
Type: "user-provided",
73-
},
74-
}))
75-
76-
Describe("CFServiceOffering", test(&korifiv1alpha1.CFServiceOffering{}))
77-
78-
Describe("CFServicePlan", test(&korifiv1alpha1.CFServicePlan{
79-
Spec: korifiv1alpha1.CFServicePlanSpec{
80-
Visibility: korifiv1alpha1.ServicePlanVisibility{
81-
Type: korifiv1alpha1.PublicServicePlanVisibilityType,
82-
},
83-
},
84-
}))
85-
86-
Describe("CFSpace", test(&korifiv1alpha1.CFSpace{
87-
Spec: korifiv1alpha1.CFSpaceSpec{
88-
DisplayName: "asdf",
89-
},
90-
}))
91-
92-
Describe("CFTask", test(&korifiv1alpha1.CFTask{}))
9323
})
9424

9525
func test(testObj client.Object) func() {

0 commit comments

Comments
 (0)