Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for GetKubeConfigPath (0.26 sec)

  1. cmd/kubeadm/app/cmd/util/cmdutil_test.go

    			file:     "kubelet.kubeconfig",
    			expected: "kubelet.kubeconfig",
    		},
    	}
    	for _, tt := range tests {
    		t.Run(tt.name, func(t *testing.T) {
    			actualResult := GetKubeConfigPath(tt.file)
    			if actualResult != tt.expected {
    				t.Errorf(
    					"failed GetKubeConfigPath:\n\texpected: %s\n\t  actual: %s",
    					tt.expected,
    					actualResult,
    				)
    			}
    		})
    	}
    }
    
    func TestValueFromFlagsOrConfig(t *testing.T) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Feb 29 05:14:21 UTC 2024
    - 4K bytes
    - Viewed (0)
  2. cmd/kubeadm/app/cmd/util/cmdutil.go

    	}
    	return nil
    }
    
    // GetKubeConfigPath can be used to search for a kubeconfig in standard locations
    // if and empty string is passed to the function. If a non-empty string is passed
    // the function returns the same string.
    func GetKubeConfigPath(file string) string {
    	// If a value is provided respect that.
    	if file != "" {
    		return file
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Feb 29 05:14:21 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  3. cmd/kubeadm/app/cmd/token.go

    				return err
    			}
    
    			if err := bto.ApplyTo(cfg); err != nil {
    				return err
    			}
    
    			klog.V(1).Infoln("[token] getting Clientsets from kubeconfig file")
    			kubeConfigFile = cmdutil.GetKubeConfigPath(kubeConfigFile)
    			client, err := cmdutil.GetClientSet(kubeConfigFile, dryRun)
    			if err != nil {
    				return err
    			}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Apr 23 05:47:48 UTC 2024
    - 15.9K bytes
    - Viewed (0)
  4. cmd/kubeadm/app/cmd/config.go

    		// user knows that their command was invalid.
    		Run: cmdutil.SubCmdRun(),
    	}
    
    	options.AddKubeConfigFlag(cmd.PersistentFlags(), &kubeConfigFile)
    
    	kubeConfigFile = cmdutil.GetKubeConfigPath(kubeConfigFile)
    	cmd.AddCommand(newCmdConfigPrint(out))
    	cmd.AddCommand(newCmdConfigMigrate(out))
    	cmd.AddCommand(newCmdConfigValidate(out))
    	cmd.AddCommand(newCmdConfigImages(out))
    	return cmd
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 06:58:01 UTC 2024
    - 18.9K bytes
    - Viewed (0)
Back to top