Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 18 for outputFormat (0.14 sec)

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

    	return ret
    }
    
    // ToPrinter receives an outputFormat and returns a printer capable of
    // handling format printing.
    // Returns error if the specified outputFormat does not match supported formats.
    func (pf *PrintFlags) ToPrinter() (Printer, error) {
    	outputFormat := ""
    	if pf.OutputFormat != nil {
    		outputFormat = *pf.OutputFormat
    	}
    
    	if pf.TextPrintFlags != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Apr 19 08:22:45 UTC 2024
    - 8K bytes
    - Viewed (0)
  2. istioctl/pkg/proxyconfig/proxyconfig.go

    	path := "stats"
    	if outputFormat == jsonOutput || outputFormat == yamlOutput {
    		// for yaml output we will convert the json to yaml when printed
    		path += "?format=json"
    	} else if outputFormat == prometheusOutput {
    		path += "/prometheus"
    	} else if outputFormat == prometheusMergedOutput {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Apr 16 03:28:36 UTC 2024
    - 48K bytes
    - Viewed (0)
  3. istioctl/pkg/ztunnelconfig/ztunnelconfig.go

    		RunE: runConfigDump(ctx, common, func(cw *ztunnelDump.ConfigWriter) error {
    			switch common.outputFormat {
    			case summaryOutput:
    				return cw.PrintSecretSummary()
    			case jsonOutput, yamlOutput:
    				return cw.PrintSecretDump(common.outputFormat)
    			default:
    				return fmt.Errorf("output format %q not supported", common.outputFormat)
    			}
    		}),
    		ValidArgsFunction: completion.ValidPodsNameArgs(ctx),
    	}
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jun 06 20:18:34 UTC 2024
    - 22K bytes
    - Viewed (0)
  4. cmd/kubeadm/app/cmd/config_test.go

    	}
    
    	testcases := []struct {
    		name           string
    		cfg            kubeadmapiv1.ClusterConfiguration
    		outputFormat   string
    		expectedOutput string
    	}{
    		{
    			name: "text output",
    			cfg: kubeadmapiv1.ClusterConfiguration{
    				KubernetesVersion: dummyKubernetesVersionStr,
    			},
    			outputFormat: "text",
    			expectedOutput: `registry.k8s.io/kube-apiserver:{{.KubeVersion}}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 06:58:01 UTC 2024
    - 13K bytes
    - Viewed (0)
  5. cmd/kubeadm/app/cmd/token_test.go

    		extraGroups  []string
    		outputFormat string
    		expected     string
    	}{
    		{
    			name:         "JSON output",
    			id:           "abcdef",
    			secret:       "1234567890123456",
    			description:  "valid bootstrap tooken",
    			usages:       []string{"signing", "authentication"},
    			extraGroups:  []string{"system:bootstrappers:kubeadm:default-node-token"},
    			outputFormat: "json",
    			expected: `{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Apr 23 05:47:48 UTC 2024
    - 13.6K bytes
    - Viewed (0)
  6. istioctl/pkg/writer/ztunnel/configdump/configdump.go

    	}
    	_, _ = c.Stdout.Write([]byte("\n"))
    	if err := c.PrintSecretSummary(); err != nil {
    		return err
    	}
    	return nil
    }
    
    func (c *ConfigWriter) PrintFullDump(outputFormat string) error {
    	out := c.FullDump
    	if outputFormat == "yaml" {
    		var err error
    		out, err = yaml.JSONToYAML(out)
    		if err != nil {
    			return err
    		}
    	}
    	fmt.Fprintln(c.Stdout, string(out))
    	return nil
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jun 06 20:18:34 UTC 2024
    - 3.9K bytes
    - Viewed (0)
  7. istioctl/pkg/writer/ztunnel/configdump/policies.go

    	}
    	return w.Flush()
    }
    
    // PrintPolicyDump prints the relevant services in the config dump to the ConfigWriter stdout
    func (c *ConfigWriter) PrintPolicyDump(filter PolicyFilter, outputFormat string) error {
    	zDump := c.ztunnelDump
    	policies := slices.Filter(zDump.Policies, filter.Verify)
    	slices.SortFunc(policies, func(a, b *ZtunnelPolicy) int {
    		if r := cmp.Compare(a.Namespace, b.Namespace); r != 0 {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri May 31 21:45:11 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  8. istioctl/pkg/writer/ztunnel/configdump/services.go

    	}
    	return w.Flush()
    }
    
    // PrintServiceDump prints the relevant services in the config dump to the ConfigWriter stdout
    func (c *ConfigWriter) PrintServiceDump(filter ServiceFilter, outputFormat string) error {
    	zDump := c.ztunnelDump
    	svcs := slices.Filter(zDump.Services, filter.Verify)
    	slices.SortFunc(svcs, func(a, b *ZtunnelService) int {
    		if r := cmp.Compare(a.Namespace, b.Namespace); r != 0 {
    			return r
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri May 31 21:45:11 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  9. istioctl/pkg/writer/ztunnel/configdump/connections.go

    	"istio.io/istio/pkg/slices"
    )
    
    type ConnectionsFilter struct {
    	Namespace string
    	Direction string
    	Raw       bool
    }
    
    func (c *ConfigWriter) PrintConnectionsDump(filter ConnectionsFilter, outputFormat string) error {
    	d := c.ztunnelDump
    	workloads := maps.Values(d.WorkloadState)
    	workloads = slices.SortFunc(workloads, func(a, b WorkloadState) int {
    		if r := cmp.Compare(a.Info.Namespace, b.Info.Namespace); r != 0 {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri May 31 21:45:11 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  10. istioctl/pkg/writer/ztunnel/configdump/certificates.go

    func (c *ConfigWriter) PrintSecretDump(outputFormat string) error {
    	if c.ztunnelDump == nil {
    		return fmt.Errorf("config writer has not been primed")
    	}
    	secretDump := c.ztunnelDump.Certificates
    	out, err := json.MarshalIndent(secretDump, "", "    ")
    	if err != nil {
    		return fmt.Errorf("failed to marshal secrets dump: %v", err)
    	}
    	if outputFormat == "yaml" {
    		if out, err = yaml.JSONToYAML(out); err != nil {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Apr 25 16:38:16 UTC 2024
    - 3.2K bytes
    - Viewed (0)
Back to top