func (c *clusterctlClient) addToInstaller(options addToInstallerOptions, providerType clusterctlv1.ProviderType, providers ...string) error {
	for _, provider := range providers {
		// It is possible to opt-out from automatic installation of bootstrap/control-plane providers using '-' as a provider name (NoopProvider).
		if provider == NoopProvider {
			if providerType == clusterctlv1.CoreProviderType {
				return errors.New("the '-' value can not be used for the core provider")
			}
			continue
		}
		componentsOptions := repository.ComponentsOptions{
			TargetNamespace: options.targetNamespace,
			SkipVariables:   options.skipVariables,
		}
		components, err := c.getComponentsByName(provider, providerType, componentsOptions)
		if err != nil {
			return errors.Wrapf(err, "failed to get provider components for the %q provider", provider)
		}

		if components.Type() != providerType {
			return errors.Errorf("can't use %q provider as an %q, it is a %q", provider, providerType, components.Type())
		}

		options.installer.Add(components)
	}
	return nil
}
// addToInstaller adds the components to the install queue and checks that the actual provider type match the target group.
addToInstaller adds the components to the install queue and checks that the actual provider type match the target group.
// addToInstaller adds the components to the install queue and checks that the actual provider type match the target group .
func (c *clusterctlClient) addToInstaller(options addToInstallerOptions, providerType clusterctlv1.ProviderType, providers ...string) error {
	for _, provider := range providers {
		if provider == NoopProvider {
			if providerType == clusterctlv1.CoreProviderType {
				return errors.New("the '-' value can not be used for the core provider")
			}
			continue
		}
		componentsOptions := repository.ComponentsOptions{
			TargetNamespace: options.targetNamespace,
			SkipVariables:   options.skipVariables,
		}
		components, err := c.getComponentsByName(provider, providerType, componentsOptions)
		if err != nil {
			return errors.Wrapf(err, "failed to get provider components for the %q provider", provider)
		}
		if components.Type() != providerType {
			return errors.Errorf("can't use %q provider as an %q, it is a %q", provider, providerType, components.Type())
		}
		options.installer.Add(components)
	}
	return nil
}
func ( c * clusterctlClient ) addToInstaller ( options addToInstallerOptions , providerType clusterctlv1 . ProviderType , providers ... string ) error { for _ , provider := range providers { if provider == NoopProvider { if providerType == clusterctlv1 . CoreProviderType { return errors . New ( " " ) } continue } componentsOptions := repository . ComponentsOptions { TargetNamespace : options . targetNamespace , SkipVariables : options . skipVariables , } components , err := c . getComponentsByName ( provider , providerType , componentsOptions ) if err != nil { return errors . Wrapf ( err , " " , provider ) } if components . Type ( ) != providerType { return errors . Errorf ( " " , provider , providerType , components . Type ( ) ) } options . installer . Add ( components ) } return nil }
addToInstaller adds the components to the install queue and checks that the actual provider type match the target group.
addToInstaller adds the components to the install queue and checks that the actual provider type match the target group .
// It is possible to opt-out from automatic installation of bootstrap/control-plane providers using '-' as a provider name (NoopProvider).