mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 17:30:00 +00:00
improve the expression of some comments
This commit is contained in:
parent
5a8f831964
commit
d32526fba4
@ -21,7 +21,7 @@ package v1alpha3
|
|||||||
const (
|
const (
|
||||||
// DefaultCACertPath defines default location of CA certificate on Windows
|
// DefaultCACertPath defines default location of CA certificate on Windows
|
||||||
DefaultCACertPath = "C:/etc/kubernetes/pki/ca.crt"
|
DefaultCACertPath = "C:/etc/kubernetes/pki/ca.crt"
|
||||||
// DefaultSocketUrlScheme defines default socket url prefix
|
// DefaultUrlScheme defines default socket url prefix
|
||||||
DefaultUrlScheme = "tcp"
|
DefaultUrlScheme = "tcp"
|
||||||
// DefaultCRISocket defines the default cri socket
|
// DefaultCRISocket defines the default cri socket
|
||||||
DefaultCRISocket = "tcp://localhost:2375"
|
DefaultCRISocket = "tcp://localhost:2375"
|
||||||
|
@ -21,7 +21,7 @@ package v1beta1
|
|||||||
const (
|
const (
|
||||||
// DefaultCACertPath defines default location of CA certificate on Windows
|
// DefaultCACertPath defines default location of CA certificate on Windows
|
||||||
DefaultCACertPath = "C:/etc/kubernetes/pki/ca.crt"
|
DefaultCACertPath = "C:/etc/kubernetes/pki/ca.crt"
|
||||||
// DefaultSocketUrlScheme defines default socket url prefix
|
// DefaultUrlScheme defines default socket url prefix
|
||||||
DefaultUrlScheme = "tcp"
|
DefaultUrlScheme = "tcp"
|
||||||
// DefaultCRISocket defines the default cri socket
|
// DefaultCRISocket defines the default cri socket
|
||||||
DefaultCRISocket = "tcp://localhost:2375"
|
DefaultCRISocket = "tcp://localhost:2375"
|
||||||
|
@ -45,7 +45,11 @@ func SetJoinDynamicDefaults(cfg *kubeadmapi.JoinConfiguration) error {
|
|||||||
return nil
|
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) {
|
func JoinConfigFileAndDefaultsToInternalConfig(cfgPath string, defaultversionedcfg *kubeadmapiv1beta1.JoinConfiguration) (*kubeadmapi.JoinConfiguration, error) {
|
||||||
internalcfg := &kubeadmapi.JoinConfiguration{}
|
internalcfg := &kubeadmapi.JoinConfiguration{}
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ type KernelValidatorHelperImpl struct{}
|
|||||||
|
|
||||||
var _ KernelValidatorHelper = &KernelValidatorHelperImpl{}
|
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) {
|
func (o *KernelValidatorHelperImpl) GetKernelReleaseVersion() (string, error) {
|
||||||
args := []string{"(Get-CimInstance Win32_OperatingSystem).Version"}
|
args := []string{"(Get-CimInstance Win32_OperatingSystem).Version"}
|
||||||
releaseVersion, err := exec.Command("powershell", args...).Output()
|
releaseVersion, err := exec.Command("powershell", args...).Output()
|
||||||
|
Loading…
Reference in New Issue
Block a user