-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: delete nodes that have already joined the virtual cluster from …
…the host cluster Signed-off-by: OrangeBao <[email protected]>
- Loading branch information
Showing
8 changed files
with
176 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
pkg/kubenest/controller/virtualcluster.node.controller/workflow/task/task.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package task | ||
|
||
import ( | ||
"context" | ||
|
||
"k8s.io/client-go/kubernetes" | ||
"sigs.k8s.io/controller-runtime/pkg/client" | ||
|
||
"github.com/kosmos.io/kosmos/pkg/apis/kosmos/v1alpha1" | ||
) | ||
|
||
type TaskOpt struct { | ||
NodeInfo v1alpha1.GlobalNode | ||
VirtualCluster v1alpha1.VirtualCluster | ||
KubeDNSAddress string | ||
|
||
HostK8sClient client.Client | ||
VirtualK8sClient kubernetes.Interface | ||
} | ||
|
||
type Task struct { | ||
Name string | ||
Run func(context.Context, TaskOpt, interface{}) (interface{}, error) | ||
Retry bool | ||
SubTasks []Task | ||
} |
2 changes: 1 addition & 1 deletion
2
...r.node.controller/workflow/unjoin_task.go → ...r.node.controller/workflow/task/unjoin.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package workflow | ||
package task | ||
|
||
import ( | ||
"context" | ||
|
Oops, something went wrong.