Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 43 for GetLabel (0.15 sec)

  1. operator/pkg/util/label_test.go

    			wantValue: "bar",
    			wantErr:   nil,
    		},
    	}
    	for _, tt := range tests {
    		t.Run(tt.desc, func(t *testing.T) {
    			resource := &unstructured.Unstructured{Object: make(map[string]any)}
    			gotErr := SetLabel(resource, tt.wantLabel, tt.wantValue)
    			resourceAccessor, _ := meta.Accessor(resource)
    			labels := resourceAccessor.GetLabels()
    			if gotVal, ok := labels[tt.wantLabel]; !ok || gotVal != tt.wantValue || gotErr != tt.wantErr {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jul 25 19:30:47 UTC 2022
    - 1.5K bytes
    - Viewed (0)
  2. tests/integration/pilot/revisions/revision_tag_test.go

    						Prefix: "revision-tag",
    					})
    					nsLabelParts := strings.Split(tc.nsLabel, "=")
    					if len(nsLabelParts) != 2 {
    						t.Fatalf("invalid namespace label %s", tc.nsLabel)
    					}
    					if err := revTagNs.SetLabel(nsLabelParts[0], nsLabelParts[1]); err != nil {
    						t.Fatalf("couldn't set label %q on namespace %s: %w",
    							tc.nsLabel, revTagNs.Name(), err)
    					}
    
    					deployment.New(t).WithConfig(echo.Config{
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Apr 08 22:02:59 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  3. src/cmd/trace/gstate.go

    		return
    	}
    	name := lastFunc(stk)
    	gs.baseName += fmt.Sprintf(" %s", name)
    	gs.named = true
    	gs.isSystemG = trace.IsSystemGoroutine(name)
    }
    
    // setLabel adds an additional label to the goroutine's name.
    func (gs *gState[R]) setLabel(label string) {
    	gs.label = label
    }
    
    // name returns a name for the goroutine.
    func (gs *gState[R]) name() string {
    	name := gs.baseName
    	if gs.label != "" {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 11.9K bytes
    - Viewed (0)
  4. src/cmd/trace/goroutinegen.go

    }
    
    func (g *goroutineGenerator) Sync() {
    	g.globalRangeGenerator.Sync()
    }
    
    func (g *goroutineGenerator) GoroutineLabel(ctx *traceContext, ev *trace.Event) {
    	l := ev.Label()
    	g.gStates[l.Resource.Goroutine()].setLabel(l.Label)
    }
    
    func (g *goroutineGenerator) GoroutineRange(ctx *traceContext, ev *trace.Event) {
    	r := ev.Range()
    	switch ev.Kind() {
    	case trace.EventRangeBegin:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  5. tests/integration/pilot/revisioned_upgrade_test.go

    // enableDefaultInjection takes a namespaces and relabels it such that it will have a default sidecar injected
    func enableDefaultInjection(ns namespace.Instance) error {
    	var errs *multierror.Error
    	errs = multierror.Append(errs, ns.SetLabel("istio-injection", "enabled"))
    	errs = multierror.Append(errs, ns.RemoveLabel("istio.io/rev"))
    	return errs.ErrorOrNil()
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Apr 08 22:02:59 UTC 2024
    - 4.9K bytes
    - Viewed (0)
  6. src/cmd/trace/threadgen.go

    }
    
    func (g *threadGenerator) Sync() {
    	g.globalRangeGenerator.Sync()
    }
    
    func (g *threadGenerator) GoroutineLabel(ctx *traceContext, ev *trace.Event) {
    	l := ev.Label()
    	g.gStates[l.Resource.Goroutine()].setLabel(l.Label)
    }
    
    func (g *threadGenerator) GoroutineRange(ctx *traceContext, ev *trace.Event) {
    	r := ev.Range()
    	switch ev.Kind() {
    	case trace.EventRangeBegin:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  7. pkg/test/framework/components/namespace/namespace.go

    	if c.Revision == "default" {
    		c.Revision = ""
    	}
    }
    
    // Instance represents an allocated namespace that can be used to create config, or deploy components in.
    type Instance interface {
    	Name() string
    	SetLabel(key, value string) error
    	RemoveLabel(key string) error
    	Prefix() string
    	Labels() (map[string]string, error)
    	IsAmbient() bool
    	IsInjected() bool
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Dec 21 18:12:14 UTC 2023
    - 4.6K bytes
    - Viewed (0)
  8. src/cmd/trace/procgen.go

    	g.globalRangeGenerator.Sync()
    	g.procRangeGenerator.Sync()
    }
    
    func (g *procGenerator) GoroutineLabel(ctx *traceContext, ev *trace.Event) {
    	l := ev.Label()
    	g.gStates[l.Resource.Goroutine()].setLabel(l.Label)
    }
    
    func (g *procGenerator) GoroutineRange(ctx *traceContext, ev *trace.Event) {
    	r := ev.Range()
    	switch ev.Kind() {
    	case trace.EventRangeBegin:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 6.1K bytes
    - Viewed (0)
  9. src/cmd/vendor/github.com/google/pprof/profile/profile.go

    			labelString = fmt.Sprintf("%s:%v", k, v)
    		}
    		ls = append(ls, labelString)
    	}
    	sort.Strings(ls)
    	return strings.Join(ls, " ")
    }
    
    // SetLabel sets the specified key to the specified value for all samples in the
    // profile.
    func (p *Profile) SetLabel(key string, value []string) {
    	for _, sample := range p.Sample {
    		if sample.Label == nil {
    			sample.Label = map[string][]string{key: value}
    		} else {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 31 19:48:28 UTC 2024
    - 22.3K bytes
    - Viewed (0)
  10. tests/integration/helm/upgrade/util.go

    		// change the old namespace that was pointing to the old prod (1-15-0) to point to the
    		// 'latest' revision by setting the `istio.io/rev=prod` label on the namespace
    		err := oldNs.SetLabel(label.IoIstioRev.Name, prodTag)
    		if err != nil {
    			t.Fatal("could not remove istio.io/rev from old namespace")
    		}
    
    		err = oldClient.Restart()
    		if err != nil {
    			t.Fatal("could not restart old client")
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 09 19:04:51 UTC 2024
    - 14.4K bytes
    - Viewed (0)
Back to top