Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for GetObjectMeta (0.26 sec)

  1. pilot/pkg/config/kube/crd/config.go

    func (in *IstioKind) GetSpec() json.RawMessage {
    	return in.Spec
    }
    
    // GetStatus from a wrapper
    func (in *IstioKind) GetStatus() *json.RawMessage {
    	return in.Status
    }
    
    // GetObjectMeta from a wrapper
    func (in *IstioKind) GetObjectMeta() metav1.ObjectMeta {
    	return in.ObjectMeta
    }
    
    // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Apr 25 18:26:16 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/objectmeta/coerce.go

    	"k8s.io/apimachinery/pkg/runtime"
    	utiljson "k8s.io/apimachinery/pkg/util/json"
    	"k8s.io/apimachinery/pkg/util/validation/field"
    	kjson "sigs.k8s.io/json"
    )
    
    // GetObjectMeta calls GetObjectMetaWithOptions without returning unknown field paths.
    func GetObjectMeta(obj map[string]interface{}, dropMalformedFields bool) (*metav1.ObjectMeta, bool, error) {
    	meta, found, _, err := GetObjectMetaWithOptions(obj, ObjectMetaOptions{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jul 18 14:55:12 UTC 2022
    - 5.4K bytes
    - Viewed (0)
  3. pilot/pkg/config/kube/crd/config_test.go

    		t.Errorf("GetStatus() => got %v, want %v", got, status)
    	}
    
    	meta := metav1.ObjectMeta{Name: "test"}
    	obj.ObjectMeta = meta
    	if got := obj.GetObjectMeta(); !reflect.DeepEqual(meta, got) {
    		t.Errorf("GetObjectMeta() => got %v, want %v", got, meta)
    	}
    
    	if got := obj.DeepCopy(); !reflect.DeepEqual(*got, obj) {
    		t.Errorf("DeepCopy() => got %v, want %v", got, obj)
    	}
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Apr 25 18:26:16 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/objectmeta/coerce_test.go

    						t.Fatalf("error on %v=%#v: %v", pth, v, err)
    					}
    				}
    
    				// make sure dropInvalidTypedFields+getObjectMeta matches what we expect
    				u := &unstructured.Unstructured{Object: map[string]interface{}{"metadata": spuriousMetaMap}}
    				actualObjectMeta, _, err := GetObjectMeta(u.Object, true)
    				if err != nil {
    					t.Errorf("got unexpected error after dropping invalid typed fields on %v=%#v: %v", pth, v, err)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 12 15:48:03 UTC 2023
    - 12.7K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/meta.go

    package v1
    
    import (
    	"k8s.io/apimachinery/pkg/runtime/schema"
    	"k8s.io/apimachinery/pkg/types"
    )
    
    // TODO: move this, Object, List, and Type to a different package
    type ObjectMetaAccessor interface {
    	GetObjectMeta() Object
    }
    
    // Object lets you work with object metadata from any of the versioned or
    // internal API objects. Attempting to set or retrieve a field on an object that does
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 05 20:12:50 UTC 2022
    - 7.7K bytes
    - Viewed (0)
  6. pkg/kube/util.go

    	if !ok {
    		// shouldn't happen
    		return obj, nil
    	}
    	// ManagedFields is large and we never use it
    	t.GetObjectMeta().SetManagedFields(nil)
    	// Annotation is never used
    	t.GetObjectMeta().SetAnnotations(nil)
    	// OwnerReference is never used
    	t.GetObjectMeta().SetOwnerReferences(nil)
    	// only node labels and addressed are useful
    	if node := obj.(*corev1.Node); node != nil {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jun 06 05:10:23 UTC 2024
    - 18.6K bytes
    - Viewed (0)
  7. pkg/api/testing/meta_test.go

    					if m.GetResourceVersion() != "102030" {
    						t.Errorf("%v (%v) did not preserve resource version", gv.WithKind(kind), knownType)
    						continue
    					}
    				case isOM:
    					m := om.GetObjectMeta()
    					if m == nil {
    						t.Errorf("%v (%v) returns nil ObjectMeta", gv.WithKind(kind), knownType)
    						continue
    					}
    					m.SetResourceVersion("102030")
    					if m.GetResourceVersion() != "102030" {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Feb 14 10:11:56 UTC 2022
    - 3.1K bytes
    - Viewed (0)
  8. pkg/controller/testutil/test_utils.go

    		m.RequestCount++
    		m.lock.Unlock()
    	}()
    
    	nodeCopy := *node
    	for i, updateNode := range m.UpdatedNodes {
    		if updateNode.Name == nodeCopy.Name {
    			if updateNode.GetObjectMeta().GetResourceVersion() != nodeCopy.GetObjectMeta().GetResourceVersion() {
    				return nil, apierrors.NewConflict(schema.GroupResource{}, "fake conflict", nil)
    			}
    			m.UpdatedNodes[i] = &nodeCopy
    			return node, nil
    		}
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 28 08:48:22 UTC 2024
    - 15.6K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/objectmeta/validation.go

    				allErrs = append(allErrs, field.Invalid(pth.Child("kind"), kind, "may have mixed case, but should otherwise match: "+strings.Join(errs, ",")))
    			}
    		case "metadata":
    			meta, _, err := GetObjectMeta(x, false)
    			if err != nil {
    				allErrs = append(allErrs, field.Invalid(pth.Child("metadata"), v, err.Error()))
    			} else {
    				if len(meta.Name) == 0 {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jun 10 17:46:57 UTC 2019
    - 4K bytes
    - Viewed (0)
  10. pkg/controller/statefulset/stateful_set_utils_test.go

    					claim := v1.PersistentVolumeClaim{}
    					claim.Name = "target-claim"
    					pod := v1.Pod{}
    					pod.Name = fmt.Sprintf("pod-%d", tc.ordinal)
    					pod.GetObjectMeta().SetUID("pod-123")
    					set := apps.StatefulSet{}
    					set.Name = "stateful-set"
    					set.GetObjectMeta().SetUID("ss-456")
    					set.Spec.PersistentVolumeClaimRetentionPolicy = &apps.StatefulSetPersistentVolumeClaimRetentionPolicy{
    						WhenScaled:  tc.scaleDownPolicy,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 05 19:06:41 UTC 2024
    - 50.9K bytes
    - Viewed (0)
Back to top