Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for GetWarningsForService (0.22 sec)

  1. pkg/api/service/warnings_test.go

    			},
    		},
    	}
    	for _, tt := range tests {
    		t.Run(tt.name, func(t *testing.T) {
    			if got := GetWarningsForService(tt.service, tt.oldService); !reflect.DeepEqual(got, tt.want) {
    				t.Errorf("GetWarningsForService() = %v", cmp.Diff(got, tt.want))
    			}
    		})
    	}
    }
    
    func Test_getWarningsForIP(t *testing.T) {
    	tests := []struct {
    		name      string
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jul 26 22:57:57 UTC 2023
    - 10.4K bytes
    - Viewed (0)
  2. pkg/api/service/warnings.go

    */
    
    package service
    
    import (
    	"fmt"
    	"net/netip"
    
    	"k8s.io/apimachinery/pkg/util/validation/field"
    	api "k8s.io/kubernetes/pkg/apis/core"
    	"k8s.io/kubernetes/pkg/apis/core/helper"
    )
    
    func GetWarningsForService(service, oldService *api.Service) []string {
    	if service == nil {
    		return nil
    	}
    	var warnings []string
    
    	if _, ok := service.Annotations[api.DeprecatedAnnotationTopologyAwareHints]; ok {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jul 26 22:57:57 UTC 2023
    - 4.2K bytes
    - Viewed (0)
  3. pkg/registry/core/service/strategy.go

    	return allErrs
    }
    
    // WarningsOnCreate returns warnings for the creation of the given object.
    func (svcStrategy) WarningsOnCreate(ctx context.Context, obj runtime.Object) []string {
    	return serviceapi.GetWarningsForService(obj.(*api.Service), nil)
    }
    
    // Canonicalize normalizes the object after validation.
    func (svcStrategy) Canonicalize(obj runtime.Object) {
    }
    
    func (svcStrategy) AllowCreateOnUpdate() bool {
    	return true
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 11 13:09:36 UTC 2024
    - 14.1K bytes
    - Viewed (0)
Back to top