// kubeConfigData defines the behavior that a runtime data struct passed to the kubeconfig phase
// should have. Please note that we are using an interface in order to make this phase reusable in different workflows
// (and thus with different runtime data struct, all of them requested to be compliant to this interface)
typekubeConfigDatainterface{
Cfg()*kubeadmapi.InitConfiguration
ExternalCA()bool
CertificateDir()string
CertificateWriteDir()string
KubeConfigDir()string
}
// NewKubeConfigPhase creates a kubeadm workflow phase that creates all kubeconfig files necessary to establish the control plane and the admin kubeconfig file.