Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for GroupVersionKindsHasKind (0.23 sec)

  1. cmd/kubeadm/app/util/marshal.go

    	}
    	gvks := []schema.GroupVersionKind{}
    	for gvk := range gvkmap {
    		gvks = append(gvks, gvk)
    	}
    	return gvks, nil
    }
    
    // GroupVersionKindsHasKind returns whether the following gvk slice contains the kind given as a parameter
    func GroupVersionKindsHasKind(gvks []schema.GroupVersionKind, kind string) bool {
    	for _, gvk := range gvks {
    		if gvk.Kind == kind {
    			return true
    		}
    	}
    	return false
    }
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Feb 29 05:14:21 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  2. cmd/kubeadm/app/util/marshal_test.go

    			},
    			kind:     "Baz",
    			expected: false,
    		},
    	}
    
    	for _, rt := range tests {
    		t.Run(rt.name, func(t2 *testing.T) {
    
    			actual := GroupVersionKindsHasKind(rt.gvks, rt.kind)
    			if rt.expected != actual {
    				t2.Errorf("expected gvks has kind: %t\n\tactual: %t\n", rt.expected, actual)
    			}
    		})
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Feb 29 05:14:21 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  3. cmd/kubeadm/app/util/config/common_test.go

    						len(gvks), len(test.expectedKinds))
    				}
    				for _, expectedKind := range test.expectedKinds {
    					if !kubeadmutil.GroupVersionKindsHasKind(gvks, expectedKind) {
    						t.Fatalf("migration failed to produce config kind: %s", expectedKind)
    					}
    				}
    				expectedGV := gv
    				if test.allowExperimental {
    					expectedGV = gvExperimental
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Feb 29 05:14:21 UTC 2024
    - 23.4K bytes
    - Viewed (0)
Back to top