kubekey/pkg/executor/executor.go
liujian e40c57fb9f
fix: change pipeline to playbook (#2512)
Signed-off-by: joyceliu <joyceliu@yunify.com>
Co-authored-by: joyceliu <joyceliu@yunify.com>
2025-03-24 09:51:03 +08:00

27 lines
537 B
Go

package executor
import (
"context"
"io"
kkcorev1 "github.com/kubesphere/kubekey/api/core/v1"
ctrlclient "sigs.k8s.io/controller-runtime/pkg/client"
"github.com/kubesphere/kubekey/v4/pkg/variable"
)
// Executor all task in playbook
type Executor interface {
Exec(ctx context.Context) error
}
// option for playbookExecutor, blockExecutor, taskExecutor
type option struct {
client ctrlclient.Client
playbook *kkcorev1.Playbook
variable variable.Variable
// commandLine log output. default os.stdout
logOutput io.Writer
}