Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for ownerRef (0.1 sec)

  1. pkg/controller/endpointslicemirroring/utils_test.go

    	endpoints := v1.Endpoints{
    		ObjectMeta: metav1.ObjectMeta{
    			Name:      "foo",
    			Namespace: "test",
    		},
    		Subsets: []v1.EndpointSubset{{
    			Ports: []v1.EndpointPort{{Port: 80}},
    		}},
    	}
    	ownerRef := metav1.NewControllerRef(&endpoints, gvk)
    
    	testCases := []struct {
    		name          string
    		tweakEndpoint func(ep *v1.Endpoints)
    		expectedSlice discovery.EndpointSlice
    	}{
    		{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Nov 23 15:40:23 UTC 2022
    - 7.5K bytes
    - Viewed (0)
  2. pkg/controller/garbagecollector/dump.go

    func NewMissingdotVertex(ownerRef metav1.OwnerReference) *dotVertex {
    	gv, err := schema.ParseGroupVersion(ownerRef.APIVersion)
    	if err != nil {
    		// this indicates a bad data serialization that should be prevented during storage of the API
    		utilruntime.HandleError(err)
    	}
    	return &dotVertex{
    		uid:              ownerRef.UID,
    		gvk:              gv.WithKind(ownerRef.Kind),
    		name:             ownerRef.Name,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Sep 23 17:12:33 UTC 2022
    - 9.5K bytes
    - Viewed (0)
  3. pkg/registry/rbac/helpers_test.go

    			},
    			expected: false,
    		},
    		{
    			name: "only ownerRef",
    			obj: func() runtime.Object {
    				obj := newPod()
    				obj.OwnerReferences = append(obj.OwnerReferences, metav1.OwnerReference{Name: "foo"})
    				return obj
    			},
    			old: func() runtime.Object {
    				return newPod()
    			},
    			expected: true,
    		},
    		{
    			name: "ownerRef and finalizer",
    			obj: func() runtime.Object {
    				obj := newPod()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 05 20:12:50 UTC 2022
    - 4.7K bytes
    - Viewed (0)
  4. pkg/controller/endpointslicemirroring/utils.go

    	gvk := schema.GroupVersionKind{Version: "v1", Kind: "Endpoints"}
    	ownerRef := metav1.NewControllerRef(endpoints, gvk)
    	epSlice := &discovery.EndpointSlice{
    		ObjectMeta: metav1.ObjectMeta{
    			Labels:          map[string]string{},
    			Annotations:     map[string]string{},
    			OwnerReferences: []metav1.OwnerReference{*ownerRef},
    			Namespace:       endpoints.Namespace,
    		},
    		Ports:       ports,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jul 11 18:08:12 UTC 2023
    - 8.8K bytes
    - Viewed (0)
  5. pkg/kube/controllers/common.go

    	found, ok := gvk.ToGVR(gk)
    	if !ok {
    		return schema.GroupVersionResource{}, fmt.Errorf("unknown gvk: %v", gk)
    	}
    	return found, nil
    }
    
    // EnqueueForParentHandler returns a handler that will enqueue the parent (by ownerRef) resource
    func EnqueueForParentHandler(q Queue, kind config.GroupVersionKind) func(obj Object) {
    	handler := func(obj Object) {
    		for _, ref := range obj.GetOwnerReferences() {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Apr 11 08:27:29 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  6. pkg/registry/rbac/helpers.go

    */
    
    package rbac
    
    import (
    	"reflect"
    
    	"k8s.io/apimachinery/pkg/api/meta"
    	"k8s.io/apimachinery/pkg/conversion"
    	"k8s.io/apimachinery/pkg/runtime"
    )
    
    // IsOnlyMutatingGCFields checks finalizers and ownerrefs which GC manipulates
    // and indicates that only those fields are changing
    func IsOnlyMutatingGCFields(obj, old runtime.Object, equalities conversion.Equalities) bool {
    	if old == nil || reflect.ValueOf(old).IsNil() {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 29 16:29:43 UTC 2020
    - 1.5K bytes
    - Viewed (0)
Back to top