func (c *clusterctlClient) InitImages(options InitOptions) ([]string, error) {
	// gets access to the management cluster
	clusterClient, err := c.clusterClientFactory(ClusterClientFactoryInput{Kubeconfig: options.Kubeconfig})
	if err != nil {
		return nil, err
	}

	// Ensure this command only runs against empty management clusters or v1alpha4 management clusters.
	if err := clusterClient.ProviderInventory().CheckCAPIContract(cluster.AllowCAPINotInstalled{}); err != nil {
		return nil, err
	}

	// checks if the cluster already contains a Core provider.
	// if not we consider this the first time init is executed, and thus we enforce the installation of a core provider,
	// a bootstrap provider and a control-plane provider (if not already explicitly requested by the user)
	c.addDefaultProviders(clusterClient, &options)

	// skip variable parsing when listing images
	options.skipVariables = true

	// create an installer service, add the requested providers to the install queue and then perform validation
	// of the target state of the management cluster before starting the installation.
	installer, err := c.setupInstaller(clusterClient, options)
	if err != nil {
		return nil, err
	}

	certManager, err := clusterClient.CertManager()
	if err != nil {
		return nil, err
	}

	// Gets the list of container images required for the cert-manager (if not already installed).
	images, err := certManager.Images()
	if err != nil {
		return nil, err
	}

	// Appends the list of container images required for the selected providers.
	images = append(images, installer.Images()...)

	sort.Strings(images)
	return images, nil
}
// Init returns the list of images required for init.
Init returns the list of images required for init.
// Init returns the list of images required for init .
func (c *clusterctlClient) InitImages(options InitOptions) ([]string, error) {
	clusterClient, err := c.clusterClientFactory(ClusterClientFactoryInput{Kubeconfig: options.Kubeconfig})
	if err != nil {
		return nil, err
	}
	if err := clusterClient.ProviderInventory().CheckCAPIContract(cluster.AllowCAPINotInstalled{}); err != nil {
		return nil, err
	}
	c.addDefaultProviders(clusterClient, &options)
	options.skipVariables = true
	installer, err := c.setupInstaller(clusterClient, options)
	if err != nil {
		return nil, err
	}
	certManager, err := clusterClient.CertManager()
	if err != nil {
		return nil, err
	}
	images, err := certManager.Images()
	if err != nil {
		return nil, err
	}
	images = append(images, installer.Images()...)
	sort.Strings(images)
	return images, nil
}
func ( c * clusterctlClient ) InitImages ( options InitOptions ) ( [ ] string , error ) { clusterClient , err := c . clusterClientFactory ( ClusterClientFactoryInput { Kubeconfig : options . Kubeconfig } ) if err != nil { return nil , err } if err := clusterClient . ProviderInventory ( ) . CheckCAPIContract ( cluster . AllowCAPINotInstalled { } ) ; err != nil { return nil , err } c . addDefaultProviders ( clusterClient , & options ) options . skipVariables = true installer , err := c . setupInstaller ( clusterClient , options ) if err != nil { return nil , err } certManager , err := clusterClient . CertManager ( ) if err != nil { return nil , err } images , err := certManager . Images ( ) if err != nil { return nil , err } images = append ( images , installer . Images ( ) ... ) sort . Strings ( images ) return images , nil }
Init returns the list of images required for init.
Init returns the list of images required for init .
// gets access to the management cluster // Ensure this command only runs against empty management clusters or v1alpha4 management clusters. // checks if the cluster already contains a Core provider. // if not we consider this the first time init is executed, and thus we enforce the installation of a core provider, // a bootstrap provider and a control-plane provider (if not already explicitly requested by the user) // skip variable parsing when listing images // create an installer service, add the requested providers to the install queue and then perform validation // of the target state of the management cluster before starting the installation. // Gets the list of container images required for the cert-manager (if not already installed). // Appends the list of container images required for the selected providers.