mirror of
https://github.com/openshift/installer.git
synced 2026-02-05 06:46:36 +01:00
To generate only the the config ISO instead of the normal one. Removed also unused flags from the params file
33 lines
818 B
Go
33 lines
818 B
Go
package nodejoiner
|
|
|
|
import (
|
|
"context"
|
|
|
|
agentpkg "github.com/openshift/installer/pkg/agent"
|
|
"github.com/openshift/installer/pkg/asset/agent/workflow"
|
|
)
|
|
|
|
// NewMonitorAddNodesCommand creates a new command for monitor add nodes.
|
|
func NewMonitorAddNodesCommand(directory, kubeconfigPath string, ips []string) error {
|
|
err := saveParams(directory, kubeconfigPath)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
// sshKey is not required parameter for monitor-add-nodes
|
|
sshKey := ""
|
|
|
|
clusters := []*agentpkg.Cluster{}
|
|
ctx := context.Background()
|
|
for _, ip := range ips {
|
|
cluster, err := agentpkg.NewCluster(ctx, directory, ip, kubeconfigPath, sshKey, workflow.AgentWorkflowTypeAddNodes)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
clusters = append(clusters, cluster)
|
|
}
|
|
agentpkg.MonitorAddNodes(ctx, clusters, ips)
|
|
|
|
return nil
|
|
}
|