improve the expression of some comments

This commit is contained in:
SataQiu 2018-11-01 17:44:37 +08:00
parent 5a8f831964
commit d32526fba4
4 changed files with 8 additions and 4 deletions

View File

@ -21,7 +21,7 @@ package v1alpha3
const (
// DefaultCACertPath defines default location of CA certificate on Windows
DefaultCACertPath = "C:/etc/kubernetes/pki/ca.crt"
// DefaultSocketUrlScheme defines default socket url prefix
// DefaultUrlScheme defines default socket url prefix
DefaultUrlScheme = "tcp"
// DefaultCRISocket defines the default cri socket
DefaultCRISocket = "tcp://localhost:2375"

View File

@ -21,7 +21,7 @@ package v1beta1
const (
// DefaultCACertPath defines default location of CA certificate on Windows
DefaultCACertPath = "C:/etc/kubernetes/pki/ca.crt"
// DefaultSocketUrlScheme defines default socket url prefix
// DefaultUrlScheme defines default socket url prefix
DefaultUrlScheme = "tcp"
// DefaultCRISocket defines the default cri socket
DefaultCRISocket = "tcp://localhost:2375"

View File

@ -45,7 +45,11 @@ func SetJoinDynamicDefaults(cfg *kubeadmapi.JoinConfiguration) error {
return nil
}
// JoinConfigFileAndDefaultsToInternalConfig
// JoinConfigFileAndDefaultsToInternalConfig takes a path to a config file and a versioned configuration that can serve as the default config
// If cfgPath is specified, defaultversionedcfg will always get overridden. Otherwise, the default config (often populated by flags) will be used.
// Then the external, versioned configuration is defaulted and converted to the internal type.
// Right thereafter, the configuration is defaulted again with dynamic values (like IP addresses of a machine, etc)
// Lastly, the internal config is validated and returned.
func JoinConfigFileAndDefaultsToInternalConfig(cfgPath string, defaultversionedcfg *kubeadmapiv1beta1.JoinConfiguration) (*kubeadmapi.JoinConfiguration, error) {
internalcfg := &kubeadmapi.JoinConfiguration{}

View File

@ -49,7 +49,7 @@ type KernelValidatorHelperImpl struct{}
var _ KernelValidatorHelper = &KernelValidatorHelperImpl{}
// GetKernelRelease returns the windows release version (ex. 10.0.14393) as a string
// GetKernelReleaseVersion returns the windows release version (ex. 10.0.14393) as a string
func (o *KernelValidatorHelperImpl) GetKernelReleaseVersion() (string, error) {
args := []string{"(Get-CimInstance Win32_OperatingSystem).Version"}
releaseVersion, err := exec.Command("powershell", args...).Output()