func (rm *Manager) IsExternallyManaged(caBaseName string) (bool, error) {
	switch caBaseName {
	case kubeadmconstants.CACertAndKeyBaseName:
		externallyManaged, err := certsphase.UsingExternalCA(rm.cfg)
		if err != nil {
			return false, errors.Wrapf(err, "Error checking external CA condition for %s certificate authority", caBaseName)
		}
		return externallyManaged, nil
	case kubeadmconstants.FrontProxyCACertAndKeyBaseName:
		externallyManaged, err := certsphase.UsingExternalFrontProxyCA(rm.cfg)
		if err != nil {
			return false, errors.Wrapf(err, "Error checking external CA condition for %s certificate authority", caBaseName)
		}
		return externallyManaged, nil
	case kubeadmconstants.EtcdCACertAndKeyBaseName:
		return false, nil
	default:
		return false, errors.Errorf("unknown certificate authority %s", caBaseName)
	}
}
// IsExternallyManaged checks if we are in the external CA case (CA certificate provided without the certificate key)
IsExternallyManaged checks if we are in the external CA case (CA certificate provided without the certificate key)
// IsExternallyManaged checks if we are in the external CA case ( CA certificate provided without the certificate key )
func (rm *Manager) IsExternallyManaged(caBaseName string) (bool, error) {
	switch caBaseName {
	case kubeadmconstants.CACertAndKeyBaseName:
		externallyManaged, err := certsphase.UsingExternalCA(rm.cfg)
		if err != nil {
			return false, errors.Wrapf(err, "Error checking external CA condition for %s certificate authority", caBaseName)
		}
		return externallyManaged, nil
	case kubeadmconstants.FrontProxyCACertAndKeyBaseName:
		externallyManaged, err := certsphase.UsingExternalFrontProxyCA(rm.cfg)
		if err != nil {
			return false, errors.Wrapf(err, "Error checking external CA condition for %s certificate authority", caBaseName)
		}
		return externallyManaged, nil
	case kubeadmconstants.EtcdCACertAndKeyBaseName:
		return false, nil
	default:
		return false, errors.Errorf("unknown certificate authority %s", caBaseName)
	}
}
func ( rm * Manager ) IsExternallyManaged ( caBaseName string ) ( bool , error ) { switch caBaseName { case kubeadmconstants . CACertAndKeyBaseName : externallyManaged , err := certsphase . UsingExternalCA ( rm . cfg ) if err != nil { return false , errors . Wrapf ( err , " " , caBaseName ) } return externallyManaged , nil case kubeadmconstants . FrontProxyCACertAndKeyBaseName : externallyManaged , err := certsphase . UsingExternalFrontProxyCA ( rm . cfg ) if err != nil { return false , errors . Wrapf ( err , " " , caBaseName ) } return externallyManaged , nil case kubeadmconstants . EtcdCACertAndKeyBaseName : return false , nil default : return false , errors . Errorf ( " " , caBaseName ) } }
IsExternallyManaged checks if we are in the external CA case (CA certificate provided without the certificate key)
IsExternallyManaged checks if we are in the external CA case ( CA certificate provided without the certificate key )