Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 21 for kubeConfigPath (0.26 sec)

  1. cmd/kubeadm/app/cmd/phases/init/kubeletfinalize.go

    	kubeconfig, err := clientcmd.LoadFromFile(kubeconfigPath)
    	if err != nil {
    		return errors.Wrapf(err, "could not load %q", kubeconfigPath)
    	}
    
    	// Perform basic validation. The errors here can only happen if the kubelet.conf was corrupted.
    	if len(kubeconfig.CurrentContext) == 0 {
    		return errors.Errorf("the file %q does not have current context set", kubeconfigPath)
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Apr 23 10:54:51 UTC 2024
    - 6.8K bytes
    - Viewed (0)
  2. pkg/test/framework/components/cluster/kube/factory.go

    		return nil, err
    	}
    
    	kubeconfigPath := cfg.Meta.String(kubeconfigMetaKey)
    	kubeconfigPath, err = file.NormalizePath(kubeconfigPath)
    	if err != nil {
    		return nil, err
    	}
    
    	var client istioKube.CLIClient
    	if len(cfg.HTTPProxy) > 0 {
    		proxyURL, err := url.Parse(cfg.HTTPProxy)
    		if err != nil {
    			return nil, err
    		}
    		client, err = buildClientWithProxy(kubeconfigPath, proxyURL)
    		if err != nil {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jun 06 22:12:34 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  3. cmd/kubemark/app/hollow_node_test.go

    	}))
    	defer server.Close()
    
    	kubeconfigPath := filepath.Join(tmpDir, "config.kubeconfig")
    	if err := os.WriteFile(kubeconfigPath, []byte(fmt.Sprintf(fakeKubeconfig, server.URL)), os.FileMode(0600)); err != nil {
    		t.Fatal(err)
    	}
    
    	for morph := range knownMorphs {
    		morph := morph
    		t.Run(morph, func(t *testing.T) {
    			s := &hollowNodeConfig{
    				KubeconfigPath: kubeconfigPath,
    				Morph:          morph,
    			}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 10:06:15 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  4. cmd/kubeadm/app/cmd/upgrade/node.go

    	if _, err := os.Stat(filepath); os.IsNotExist(err) {
    		isControlPlaneNode = false
    	}
    	if len(nodeOptions.kubeConfigPath) == 0 {
    		// Update the kubeconfig path depending on whether this is a control plane node or not.
    		nodeOptions.kubeConfigPath = constants.GetKubeletKubeConfigPath()
    		if isControlPlaneNode {
    			nodeOptions.kubeConfigPath = constants.GetAdminKubeConfigPath()
    		}
    	}
    
    	externalCfg := &v1beta4.UpgradeConfiguration{}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 16 08:34:39 UTC 2024
    - 10K bytes
    - Viewed (0)
  5. cmd/kubeadm/app/cmd/upgrade/diff_test.go

    	if err != nil {
    		t.Fatal(err)
    	}
    	defer os.Remove(testUpgradeDiffManifest)
    
    	kubeConfigPath, err := createTestRunDiffFile([]byte(testConfigToken))
    	if err != nil {
    		t.Fatal(err)
    	}
    	//nolint:errcheck
    	defer os.Remove(kubeConfigPath)
    
    	flags := &diffFlags{
    		cfgPath: "",
    		out:     io.Discard,
    	}
    
    	testCases := []struct {
    		name            string
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 13 04:08:57 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  6. cmd/kubemark/app/hollow_node.go

    }
    
    func (c *hollowNodeConfig) createClientConfigFromFile() (*restclient.Config, error) {
    	clientConfig, err := clientcmd.LoadFromFile(c.KubeconfigPath)
    	if err != nil {
    		return nil, fmt.Errorf("error while loading kubeconfig from file %v: %v", c.KubeconfigPath, err)
    	}
    	config, err := clientcmd.NewDefaultClientConfig(*clientConfig, &clientcmd.ConfigOverrides{}).ClientConfig()
    	if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 14 08:58:18 UTC 2024
    - 11K bytes
    - Viewed (0)
  7. cmd/kubeadm/app/cmd/certs.go

    type expirationFlags struct {
    	cfgPath        string
    	kubeconfigPath string
    	cfg            kubeadmapiv1.ClusterConfiguration
    }
    
    func addExpirationFlags(cmd *cobra.Command, flags *expirationFlags) {
    	options.AddConfigFlag(cmd.Flags(), &flags.cfgPath)
    	options.AddCertificateDirFlag(cmd.Flags(), &flags.cfg.CertificatesDir)
    	options.AddKubeConfigFlag(cmd.Flags(), &flags.kubeconfigPath)
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 01 16:01:49 UTC 2024
    - 19.4K bytes
    - Viewed (0)
  8. cmd/kubeadm/app/apis/kubeadm/v1beta4/defaults.go

    func SetDefaults_FileDiscovery(obj *FileDiscovery) {
    	// Make sure file URL becomes path
    	if len(obj.KubeConfigPath) != 0 {
    		u, err := url.Parse(obj.KubeConfigPath)
    		if err == nil && u.Scheme == "file" {
    			obj.KubeConfigPath = u.Path
    		}
    	}
    }
    
    // SetDefaults_BootstrapTokens sets the defaults for the .BootstrapTokens field
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 16 08:34:39 UTC 2024
    - 9.3K bytes
    - Viewed (0)
  9. cmd/kubeadm/app/cmd/options/generic.go

    	fs.StringVar(kubeConfigFile, KubeconfigPath, *kubeConfigFile, "The kubeconfig file to use when talking to the cluster. If the flag is not set, a set of standard locations can be searched for an existing kubeconfig file.")
    	// Note that DefValue is the text shown in the terminal and not the default value assigned to the flag
    	fs.Lookup(KubeconfigPath).DefValue = constants.GetAdminKubeConfigPath()
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 11 10:21:20 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  10. cmd/kubeadm/app/cmd/phases/upgrade/node/controlplane.go

    	phase := workflow.Phase{
    		Name:  "control-plane",
    		Short: "Upgrade the control plane instance deployed on this node, if any",
    		Run:   runControlPlane(),
    		InheritFlags: []string{
    			options.DryRun,
    			options.KubeconfigPath,
    			options.CertificateRenewal,
    			options.EtcdUpgrade,
    			options.Patches,
    		},
    	}
    	return phase
    }
    
    func runControlPlane() func(c workflow.RunData) error {
    	return func(c workflow.RunData) error {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 11 10:21:20 UTC 2024
    - 2.8K bytes
    - Viewed (0)
Back to top