Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 35 for ParseGroupVersion (0.16 sec)

  1. staging/src/k8s.io/apimachinery/pkg/runtime/serializer/json/meta.go

    		Kind string `json:"kind,omitempty"`
    	}{}
    	if err := json.Unmarshal(data, &findKind); err != nil {
    		return nil, fmt.Errorf("couldn't get version/kind; json parse error: %v", err)
    	}
    	gv, err := schema.ParseGroupVersion(findKind.APIVersion)
    	if err != nil {
    		return nil, err
    	}
    	return &schema.GroupVersionKind{Group: gv.Group, Version: gv.Version, Kind: findKind.Kind}, nil
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jan 11 14:09:48 UTC 2017
    - 2.2K bytes
    - Viewed (0)
  2. pkg/registry/admissionregistration/validatingadmissionpolicybinding/authz.go

    	if policy, err := v.policyGetter.GetValidatingAdmissionPolicy(ctx, binding.Spec.PolicyName); err == nil && policy.Spec.ParamKind != nil {
    		paramKind := policy.Spec.ParamKind
    		if gv, err := schema.ParseGroupVersion(paramKind.APIVersion); err == nil {
    			// we only need to authorize the parsed group/version
    			apiGroup = gv.Group
    			apiVersion = gv.Version
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 01 12:19:03 UTC 2024
    - 3.7K bytes
    - Viewed (0)
  3. pkg/scheduler/framework/plugins/helper/spread.go

    		}
    	}
    	selector := labelSet.AsSelector()
    
    	owner := metav1.GetControllerOfNoCopy(pod)
    	if owner == nil {
    		return selector
    	}
    
    	gv, err := schema.ParseGroupVersion(owner.APIVersion)
    	if err != nil {
    		return selector
    	}
    
    	gvk := gv.WithKind(owner.Kind)
    	switch gvk {
    	case rcKind:
    		if rc, err := cl.ReplicationControllers(pod.Namespace).Get(owner.Name); err == nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 25 20:04:48 UTC 2021
    - 3.4K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/objectmeta/validation.go

    			} else if len(apiVersion) == 0 {
    				allErrs = append(allErrs, field.Invalid(pth.Child("apiVersion"), apiVersion, "must not be empty"))
    			} else if _, err := schema.ParseGroupVersion(apiVersion); err != nil {
    				allErrs = append(allErrs, field.Invalid(pth.Child("apiVersion"), apiVersion, err.Error()))
    			}
    		case "kind":
    			if kind, ok := v.(string); !ok {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jun 10 17:46:57 UTC 2019
    - 4K bytes
    - Viewed (0)
  5. pkg/controller/garbagecollector/dump.go

    		{Key: "virtual", Value: fmt.Sprintf(`%v`, v.virtual)},
    	}
    }
    
    // NewDOTVertex creates a new dotVertex.
    func NewDOTVertex(node *node) *dotVertex {
    	gv, err := schema.ParseGroupVersion(node.identity.APIVersion)
    	if err != nil {
    		// this indicates a bad data serialization that should be prevented during storage of the API
    		utilruntime.HandleError(err)
    	}
    	return &dotVertex{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Sep 23 17:12:33 UTC 2022
    - 9.5K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/group_version.go

    	}
    	return json.Marshal(s)
    }
    
    func (gv *GroupVersion) unmarshal(value []byte) error {
    	var s string
    	if err := json.Unmarshal(value, &s); err != nil {
    		return err
    	}
    	parsed, err := schema.ParseGroupVersion(s)
    	if err != nil {
    		return err
    	}
    	gv.Group, gv.Version = parsed.Group, parsed.Version
    	return nil
    }
    
    // UnmarshalJSON implements the json.Unmarshaller interface.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Sep 04 09:55:26 UTC 2021
    - 4.8K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apimachinery/pkg/runtime/serializer/codec_test.go

    	// we understand both.
    	if err := yaml.Unmarshal(data, &findKind); err != nil {
    		return nil, fmt.Errorf("couldn't get version/kind: %v", err)
    	}
    	gv, err := schema.ParseGroupVersion(findKind.APIVersion)
    	if err != nil {
    		return nil, err
    	}
    	return &schema.GroupVersionKind{Group: gv.Group, Version: gv.Version, Kind: findKind.ObjectKind}, nil
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 12 15:46:12 UTC 2023
    - 13.2K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured_list.go

    	u.SetAPIVersion(gvk.GroupVersion().String())
    	u.SetKind(gvk.Kind)
    }
    
    func (u *UnstructuredList) GroupVersionKind() schema.GroupVersionKind {
    	gv, err := schema.ParseGroupVersion(u.GetAPIVersion())
    	if err != nil {
    		return schema.GroupVersionKind{}
    	}
    	gvk := gv.WithKind(u.GetKind())
    	return gvk
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun May 28 04:46:35 UTC 2023
    - 6.3K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apimachinery/pkg/runtime/schema/group_version_test.go

    		{input: "/v1/", err: func(err error) bool { return err.Error() == "unexpected GroupVersion string: /v1/" }},
    		{input: "v1/a", out: GroupVersion{Group: "v1", Version: "a"}},
    	}
    	for i, test := range tests {
    		out, err := ParseGroupVersion(test.input)
    		if test.err == nil && err != nil || err == nil && test.err != nil {
    			t.Errorf("%d: unexpected error: %v", i, err)
    			continue
    		}
    		if test.err != nil && !test.err(err) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 15 01:46:00 UTC 2022
    - 7.2K bytes
    - Viewed (0)
  10. pkg/kubectl/cmd/convert/convert.go

    	}
    
    	if len(infos) == 0 {
    		return fmt.Errorf("no objects passed to convert")
    	}
    
    	var specifiedOutputVersion schema.GroupVersion
    	if len(o.OutputVersion) > 0 {
    		specifiedOutputVersion, err = schema.ParseGroupVersion(o.OutputVersion)
    		if err != nil {
    			return err
    		}
    	}
    
    	internalEncoder := scheme.Codecs.LegacyCodec(scheme.Scheme.PrioritizedVersionsAllGroups()...)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 12 03:21:17 UTC 2023
    - 9.6K bytes
    - Viewed (0)
Back to top