mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-07-18 04:54:54 +00:00
Merge pull request #135971 from DEVMANISHOFFL/fix-kubeadm-reset-crash
fix(kubeadm): prevent nil pointer panic in reset command
This commit is contained in:
@@ -167,7 +167,7 @@ func newResetData(cmd *cobra.Command, opts *resetOptions, in io.Reader, out io.W
|
||||
certificatesDir = opts.externalcfg.CertificatesDir
|
||||
} else if len(resetCfg.CertificatesDir) > 0 { // configured in the ResetConfiguration
|
||||
certificatesDir = resetCfg.CertificatesDir
|
||||
} else if len(initCfg.ClusterConfiguration.CertificatesDir) > 0 { // fetch from cluster
|
||||
} else if initCfg != nil && len(initCfg.ClusterConfiguration.CertificatesDir) > 0 { // fetch from cluster
|
||||
certificatesDir = initCfg.ClusterConfiguration.CertificatesDir
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user