Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for AddWarning (0.27 sec)

  1. staging/src/k8s.io/apiserver/pkg/warning/context.go

    )
    
    // Recorder provides a method for recording warnings
    type Recorder interface {
    	// AddWarning adds the specified warning to the response.
    	// agent must be valid UTF-8, and must not contain spaces, quotes, backslashes, or control characters.
    	// text must be valid UTF-8, and must not contain control characters.
    	AddWarning(agent, text string)
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Oct 24 16:37:53 UTC 2022
    - 2.1K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/endpoints/warning/warning.go

    	if len(warnings) == 0 {
    		return handler
    	}
    
    	return func(req *restful.Request, res *restful.Response) {
    		ctx := req.Request.Context()
    		for _, msg := range warnings {
    			warning.AddWarning(ctx, "", msg)
    		}
    		handler(req, res)
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jun 09 18:11:41 UTC 2022
    - 1.1K bytes
    - Viewed (0)
  3. pkg/registry/batch/job/storage/storage.go

    		job.Strategy.DefaultGarbageCollectionPolicy(ctx) == rest.OrphanDependents {
    		// Throw a warning if delete options are not explicitly set as Job deletion strategy by default is orphaning
    		// pods in v1.
    		warning.AddWarning(ctx, "", deleteOptionWarnings)
    	}
    	return r.Store.Delete(ctx, name, deleteValidation, options)
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Nov 18 09:21:19 UTC 2022
    - 6.1K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/authentication/request/bearertoken/bearertoken.go

    		return nil, false, nil
    	}
    
    	token := parts[1]
    
    	// Empty bearer tokens aren't valid
    	if len(token) == 0 {
    		// The space before the token case
    		if len(parts) == 3 {
    			warning.AddWarning(req.Context(), "", invalidTokenWithSpaceWarning)
    		}
    		return nil, false, nil
    	}
    
    	resp, ok, err := a.auth.AuthenticateToken(req.Context(), token)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 25 13:22:28 UTC 2022
    - 2K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiserver/pkg/authentication/token/cache/cached_token_authenticator.go

    }
    
    // simple recorder that only appends warning
    type recorder struct {
    	mu       sync.Mutex
    	warnings []*cacheWarning
    }
    
    // AddWarning adds a warning to recorder.
    func (r *recorder) AddWarning(agent, text string) {
    	r.mu.Lock()
    	defer r.mu.Unlock()
    	r.warnings = append(r.warnings, &cacheWarning{agent: agent, text: text})
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jul 03 16:16:51 UTC 2023
    - 9.8K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/admission.go

    	}
    	managedFieldsAfterAdmission := objectMeta.GetManagedFields()
    	if err := managedfields.ValidateManagedFields(managedFieldsAfterAdmission); err != nil {
    		objectMeta.SetManagedFields(managedFieldsBeforeAdmission)
    		warning.AddWarning(ctx, "",
    			fmt.Sprintf(InvalidManagedFieldsAfterMutatingAdmissionWarningFormat,
    				err.Error()),
    		)
    	}
    	return nil
    }
    
    // Validate calls the wrapped admission.Interface if aplicable
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 08 21:44:00 UTC 2023
    - 3.7K bytes
    - Viewed (0)
  7. pkg/serviceaccount/legacy.go

    		}
    
    		// Check if it is an auto-generated secret-based token
    		for _, ref := range serviceAccount.Secrets {
    			if ref.Name == secret.Name {
    				autoGenerated = true
    				warning.AddWarning(ctx, "", "Use tokens from the TokenRequest API or manually created secret-based tokens instead of auto-generated secret-based tokens.")
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Nov 01 08:32:23 UTC 2023
    - 8.4K bytes
    - Viewed (0)
  8. plugin/pkg/admission/security/podsecurity/admission.go

    		return nil
    	}
    
    	result := p.delegate.Validate(ctx, &lazyConvertingAttributes{Attributes: a})
    	for _, w := range result.Warnings {
    		warning.AddWarning(ctx, "", w)
    	}
    	if len(result.AuditAnnotations) > 0 {
    		annotations := make([]string, len(result.AuditAnnotations)*2)
    		i := 0
    		for k, v := range result.AuditAnnotations {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Oct 27 08:49:11 UTC 2023
    - 8.5K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/authentication/request/bearertoken/bearertoken_test.go

    			t.Errorf("%d: expected not authenticated (no token)", i)
    		}
    	}
    }
    
    type dummyRecorder struct {
    	agent string
    	text  string
    }
    
    func (r *dummyRecorder) AddWarning(agent, text string) {
    	r.agent = agent
    	r.text = text
    	return
    }
    
    func (r *dummyRecorder) getWarning() string {
    	return r.text
    }
    
    var _ warning.Recorder = &dummyRecorder{}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 25 13:22:28 UTC 2022
    - 8.8K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/pkg/registry/rest/create.go

    		return errors.NewInvalid(kind.GroupKind(), objectMeta.GetName(), errs)
    	}
    
    	for _, w := range strategy.WarningsOnCreate(ctx, obj) {
    		warning.AddWarning(ctx, "", w)
    	}
    
    	strategy.Canonicalize(obj)
    
    	return nil
    }
    
    // CheckGeneratedNameError checks whether an error that occurred creating a resource is due
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Sep 27 11:48:28 UTC 2022
    - 9.1K bytes
    - Viewed (0)
Back to top