Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for IsNoMatchError (0.32 sec)

  1. staging/src/k8s.io/apimachinery/pkg/api/meta/multirestmapper.go

    	allGVRs := []schema.GroupVersionResource{}
    	for _, t := range m {
    		gvrs, err := t.ResourcesFor(resource)
    		// ignore "no match" errors, but any other error percolates back up
    		if IsNoMatchError(err) {
    			continue
    		}
    		if err != nil {
    			return nil, err
    		}
    
    		// walk the existing values to de-dup
    		for _, curr := range gvrs {
    			found := false
    			for _, existing := range allGVRs {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Nov 05 23:44:02 UTC 2021
    - 5.8K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apimachinery/pkg/api/meta/errors_test.go

    			new:         func() error { return &NoResourceMatchError{} },
    			matcherFunc: IsNoMatchError,
    		},
    		{
    			name:        "NoKindMatchError",
    			input:       &NoKindMatchError{SearchedVersions: []string{"foo"}},
    			new:         func() error { return &NoKindMatchError{} },
    			matcherFunc: IsNoMatchError,
    		},
    	}
    
    	for _, tc := range testCases {
    		t.Run(tc.name, func(t *testing.T) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Aug 11 22:50:51 UTC 2022
    - 2.4K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apimachinery/pkg/api/meta/firsthit_restmapper.go

    	if len(errors) == 0 {
    		return nil
    	}
    	if len(errors) == 1 {
    		return errors[0]
    	}
    
    	allNoMatchErrors := true
    	for _, err := range errors {
    		allNoMatchErrors = allNoMatchErrors && IsNoMatchError(err)
    	}
    	if allNoMatchErrors {
    		return errors[0]
    	}
    
    	return utilerrors.NewAggregate(errors)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Nov 05 23:44:02 UTC 2021
    - 2.8K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apimachinery/pkg/api/meta/errors.go

    	}
    }
    
    func (*NoKindMatchError) Is(target error) bool {
    	_, ok := target.(*NoKindMatchError)
    	return ok
    }
    
    func IsNoMatchError(err error) bool {
    	if err == nil {
    		return false
    	}
    	return errors.Is(err, &NoResourceMatchError{}) || errors.Is(err, &NoKindMatchError{})
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Aug 11 22:50:51 UTC 2022
    - 4.2K bytes
    - Viewed (0)
  5. operator/pkg/helmreconciler/prune.go

    		if err := h.client.List(context.TODO(), objects, client.MatchingLabelsSelector{Selector: selector}); err != nil {
    			// we only want to retrieve resources clusters
    			if !(h.opts.DryRun && meta.IsNoMatchError(err)) {
    				scope.Debugf("retrieving resources to prune type %s: %s", gvk.String(), err)
    			}
    			continue
    		}
    		for _, obj := range objects.Items {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Apr 02 08:32:06 UTC 2024
    - 15.9K bytes
    - Viewed (0)
  6. staging/src/k8s.io/cli-runtime/pkg/resource/builder.go

    		// if the error is _not_ a *meta.NoKindMatchError, then we had trouble doing discovery,
    		// so we should return the original error since it may help a user diagnose what is actually wrong
    		if meta.IsNoMatchError(err) {
    			return nil, fmt.Errorf("the server doesn't have a resource type %q", groupResource.Resource)
    		}
    		return nil, err
    	}
    
    	return mapping, nil
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jul 03 10:17:56 UTC 2023
    - 37.2K bytes
    - Viewed (0)
Back to top