func (p *provider) Provision(status *cli.Status, cfg *config.Cluster) (err error) {
	if err := ensureMinVersion(); err != nil {
		return err
	}

	// TODO: validate cfg
	// ensure node images are pulled before actually provisioning
	if err := ensureNodeImages(p.logger, status, cfg); err != nil {
		return err
	}

	// ensure the pre-requisite network exists
	networkName := fixedNetworkName
	if n := os.Getenv("KIND_EXPERIMENTAL_PODMAN_NETWORK"); n != "" {
		p.logger.Warn("WARNING: Overriding podman network due to KIND_EXPERIMENTAL_PODMAN_NETWORK")
		p.logger.Warn("WARNING: Here be dragons! This is not supported currently.")
		networkName = n
	}
	if err := ensureNetwork(networkName); err != nil {
		return errors.Wrap(err, "failed to ensure podman network")
	}

	// actually provision the cluster
	icons := strings.Repeat("📦 ", len(cfg.Nodes))
	status.Start(fmt.Sprintf("Preparing nodes %s", icons))
	defer func() { status.End(err == nil) }()

	// plan creating the containers
	createContainerFuncs, err := planCreation(cfg, networkName)
	if err != nil {
		return err
	}

	// actually create nodes
	return errors.UntilErrorConcurrent(createContainerFuncs)
}
// Provision is part of the providers.Provider interface
Provision is part of the providers.Provider interface
// Provision is part of the providers . Provider interface
func (p *provider) Provision(status *cli.Status, cfg *config.Cluster) (err error) {
	if err := ensureMinVersion(); err != nil {
		return err
	}
	if err := ensureNodeImages(p.logger, status, cfg); err != nil {
		return err
	}
	networkName := fixedNetworkName
	if n := os.Getenv("KIND_EXPERIMENTAL_PODMAN_NETWORK"); n != "" {
		p.logger.Warn("WARNING: Overriding podman network due to KIND_EXPERIMENTAL_PODMAN_NETWORK")
		p.logger.Warn("WARNING: Here be dragons! This is not supported currently.")
		networkName = n
	}
	if err := ensureNetwork(networkName); err != nil {
		return errors.Wrap(err, "failed to ensure podman network")
	}
	icons := strings.Repeat("📦 ", len(cfg.Nodes))
	status.Start(fmt.Sprintf("Preparing nodes %s", icons))
	defer func() { status.End(err == nil) }()
	createContainerFuncs, err := planCreation(cfg, networkName)
	if err != nil {
		return err
	}
	return errors.UntilErrorConcurrent(createContainerFuncs)
}
func ( p * provider ) Provision ( status * cli . Status , cfg * config . Cluster ) ( err error ) { if err := ensureMinVersion ( ) ; err != nil { return err } if err := ensureNodeImages ( p . logger , status , cfg ) ; err != nil { return err } networkName := fixedNetworkName if n := os . Getenv ( " " ) ; n != " " { p . logger . Warn ( " " ) p . logger . Warn ( " " ) networkName = n } if err := ensureNetwork ( networkName ) ; err != nil { return errors . Wrap ( err , " " ) } icons := strings . Repeat ( " l e (cf g .No d es)) status . Start ( fmt . Sprintf ( " " , icons ) ) defer func ( ) { status . End ( err == nil ) } ( ) createContainerFuncs , err := planCreation ( cfg , networkName ) if err != nil { return err } return errors . UntilErrorConcurrent ( createContainerFuncs ) }
Provision is part of the providers.Provider interface
Provision is part of the providers . Provider interface
// TODO: validate cfg // ensure node images are pulled before actually provisioning // ensure the pre-requisite network exists // actually provision the cluster // plan creating the containers // actually create nodes