Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for cfgData (0.1 sec)

  1. cmd/kubeadm/app/cmd/upgrade/diff_test.go

    	flags := &diffFlags{
    		cfgPath: "",
    		out:     io.Discard,
    	}
    
    	testCases := []struct {
    		name            string
    		args            []string
    		setManifestPath bool
    		manifestPath    string
    		cfgPath         string
    		expectedError   bool
    	}{
    		{
    			name:            "valid: run diff with empty config path on valid manifest path",
    			cfgPath:         "",
    			setManifestPath: true,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 13 04:08:57 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  2. cmd/kubeadm/app/util/config/joinconfiguration.go

    func LoadJoinConfigurationFromFile(cfgPath string, opts LoadOrDefaultConfigurationOptions) (*kubeadmapi.JoinConfiguration, error) {
    	klog.V(1).Infof("loading configuration from %q", cfgPath)
    
    	b, err := os.ReadFile(cfgPath)
    	if err != nil {
    		return nil, errors.Wrapf(err, "unable to read config from %q ", cfgPath)
    	}
    
    	gvkmap, err := kubeadmutil.SplitYAMLDocuments(b)
    	if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jan 05 12:41:16 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  3. cmd/kubeadm/app/util/config/resetconfiguration.go

    func LoadResetConfigurationFromFile(cfgPath string, opts LoadOrDefaultConfigurationOptions) (*kubeadmapi.ResetConfiguration, error) {
    	klog.V(1).Infof("loading configuration from %q", cfgPath)
    
    	b, err := os.ReadFile(cfgPath)
    	if err != nil {
    		return nil, errors.Wrapf(err, "unable to read config from %q ", cfgPath)
    	}
    
    	gvkmap, err := kubeadmutil.SplitYAMLDocuments(b)
    	if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jan 05 12:41:16 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  4. cmd/kubeadm/app/cmd/reset_test.go

    			flags: map[string]string{
    				options.CfgPath: configFilePath,
    			},
    			validate: func(t *testing.T, data *resetData) {
    				// validate that the default value is overwritten
    				if data.forceReset != true {
    					t.Error("Invalid forceReset")
    				}
    			},
    		},
    		{
    			name: "dryRun configured in the config file only",
    			flags: map[string]string{
    				options.CfgPath: configFilePath,
    			},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 26 13:42:50 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  5. cmd/kubeadm/app/cmd/kubeconfig_test.go

    		return "", err
    	}
    	buf.Write(data)
    	buf.WriteString("---\n")
    	data, err = yaml.Marshal(&clusterCfg)
    	if err != nil {
    		return "", err
    	}
    	buf.Write(data)
    
    	err = os.WriteFile(cfgPath, buf.Bytes(), 0644)
    	return cfgPath, err
    }
    
    func TestKubeConfigSubCommandsThatWritesToOut(t *testing.T) {
    
    	// Temporary folders for the test case
    	tmpdir := testutil.SetupTempDir(t)
    	defer os.RemoveAll(tmpdir)
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 01 16:01:49 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  6. cmd/kubeadm/app/util/config/upgradeconfiguration.go

    func LoadUpgradeConfigurationFromFile(cfgPath string, _ LoadOrDefaultConfigurationOptions) (*kubeadmapi.UpgradeConfiguration, error) {
    	var err error
    	var upgradeCfg *kubeadmapi.UpgradeConfiguration
    
    	// Otherwise, we have a config file. Let's load it.
    	configBytes, err := os.ReadFile(cfgPath)
    	if err != nil {
    		return nil, errors.Wrapf(err, "unable to load config from file %q", cfgPath)
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 01 11:04:08 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  7. cmd/kubeadm/app/cmd/options/generic.go

    }
    
    // AddConfigFlag adds the --config flag to the given flagset
    func AddConfigFlag(fs *pflag.FlagSet, cfgPath *string) {
    	fs.StringVar(cfgPath, CfgPath, *cfgPath, "Path to a kubeadm configuration file.")
    }
    
    // AddIgnorePreflightErrorsFlag adds the --ignore-preflight-errors flag to the given flagset
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 11 10:21:20 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  8. cmd/kubeadm/app/cmd/phases/join/controlplaneprepare.go

    			options.APIServerAdvertiseAddress,
    			options.CfgPath,
    			options.ControlPlane,
    			options.NodeName,
    			options.FileDiscovery,
    			options.TokenDiscovery,
    			options.TokenDiscoveryCAHash,
    			options.TokenDiscoverySkipCAHash,
    			options.TLSBootstrapToken,
    			options.TokenStr,
    			options.DryRun,
    		}
    	case "kubeconfig":
    		flags = []string{
    			options.CfgPath,
    			options.ControlPlane,
    			options.FileDiscovery,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 18 12:46:34 UTC 2024
    - 9.5K bytes
    - Viewed (0)
  9. cmd/kubeadm/app/cmd/kubeconfig.go

    func newCmdUserKubeConfig(out io.Writer) *cobra.Command {
    
    	initCfg := &kubeadmapiv1.InitConfiguration{}
    	clusterCfg := &kubeadmapiv1.ClusterConfiguration{}
    
    	var (
    		token, clientName, cfgPath string
    		organizations              []string
    		validityPeriod             time.Duration
    	)
    
    	// Creates the UX Command
    	cmd := &cobra.Command{
    		Use:     "user",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 01 16:01:49 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  10. cmd/kubeadm/app/cmd/upgrade/diff.go

    	controllerManagerManifestPath string
    	schedulerManifestPath         string
    	newK8sVersionStr              string
    	contextLines                  int
    	kubeConfigPath                string
    	cfgPath                       string
    	out                           io.Writer
    }
    
    var (
    	defaultAPIServerManifestPath         = constants.GetStaticPodFilepath(constants.KubeAPIServer, constants.GetStaticPodDirectory())
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 01 11:04:08 UTC 2024
    - 7.1K bytes
    - Viewed (0)
Back to top