Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 29 for cfgData (0.17 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/cmd/phases/init/addons_test.go

    		}, {
    			name: "kube-proxy",
    			want: []string{options.CfgPath,
    				options.KubeconfigPath,
    				options.KubernetesVersion,
    				options.ImageRepository,
    				options.DryRun,
    				options.APIServerAdvertiseAddress,
    				options.ControlPlaneEndpoint,
    				options.APIServerBindPort,
    				options.NetworkingPodSubnet,
    			},
    		}, {
    			name: "coredns",
    			want: []string{options.CfgPath,
    				options.KubeconfigPath,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Sep 08 07:35:17 UTC 2023
    - 2.2K bytes
    - Viewed (0)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. cmd/kubeadm/app/util/config/joinconfiguration_test.go

    		t.Run(rt.name, func(t2 *testing.T) {
    			cfgPath := filepath.Join(tmpdir, rt.name)
    			err := os.WriteFile(cfgPath, []byte(rt.fileContents), 0644)
    			if err != nil {
    				t.Errorf("Couldn't create file: %v", err)
    				return
    			}
    
    			opts := LoadOrDefaultConfigurationOptions{
    				SkipCRIDetect: true,
    			}
    
    			obj, err := LoadJoinConfigurationFromFile(cfgPath, opts)
    			if rt.expectErr {
    				if err == nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Oct 13 09:17:03 UTC 2023
    - 2.4K bytes
    - Viewed (0)
  9. cmd/kubeadm/app/cmd/upgrade/upgrade.go

    )
    
    // applyPlanFlags holds the values for the common flags in `kubeadm upgrade apply` and `kubeadm upgrade plan`
    type applyPlanFlags struct {
    	kubeConfigPath            string
    	cfgPath                   string
    	featureGatesString        string
    	allowExperimentalUpgrades bool
    	allowRCUpgrades           bool
    	printConfig               bool
    	ignorePreflightErrors     []string
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Aug 26 01:18:29 UTC 2022
    - 2.9K bytes
    - Viewed (0)
  10. cmd/kubeadm/app/util/config/resetconfiguration_test.go

    		t.Run(rt.name, func(t2 *testing.T) {
    			cfgPath := filepath.Join(tmpdir, rt.name)
    			err := os.WriteFile(cfgPath, []byte(rt.fileContents), 0644)
    			if err != nil {
    				t.Errorf("Couldn't create file: %v", err)
    				return
    			}
    
    			opts := LoadOrDefaultConfigurationOptions{
    				AllowExperimental: true,
    				SkipCRIDetect:     true,
    			}
    
    			obj, err := LoadResetConfigurationFromFile(cfgPath, opts)
    			if rt.expectErr {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Dec 06 13:21:52 UTC 2023
    - 3.4K bytes
    - Viewed (0)
Back to top