- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for IsMissingKind (0.53 sec)
-
staging/src/k8s.io/apimachinery/pkg/runtime/error.go
return &missingKindErr{data} } func (k *missingKindErr) Error() string { return fmt.Sprintf("Object 'Kind' is missing in '%s'", k.data) } // IsMissingKind returns true if the error indicates that the provided object // is missing a 'Kind' field. func IsMissingKind(err error) bool { if err == nil { return false } _, ok := err.(*missingKindErr) return ok } type missingVersionErr struct {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Nov 19 21:24:36 UTC 2021 - 4.7K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/runtime/serializer/cbor/cbor_test.go
metaFactory: stubMetaFactory{gvk: &schema.GroupVersionKind{}}, expectedObj: nil, expectedGVK: &schema.GroupVersionKind{Version: "v"}, assertOnError: func(t *testing.T, err error) { if !runtime.IsMissingKind(err) { t.Errorf("expected MissingKind, got: %v", err) } }, }, { name: "missing version", gvk: &schema.GroupVersionKind{Kind: "k"},
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon May 13 14:57:12 UTC 2024 - 20.1K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/admission/config.go
} return configProvider{ config: decodedConfig, }, nil } // we got an error where the decode wasn't related to a missing type if !(runtime.IsMissingVersion(err) || runtime.IsMissingKind(err) || runtime.IsNotRegisteredError(err)) { return nil, err } // Only tolerate load errors if the file appears to be one of the two legacy plugin configs unstructuredData := map[string]interface{}{}
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Jun 29 15:48:39 UTC 2023 - 5.8K bytes - Viewed (0) -
pkg/auth/authorizer/abac/abac.go
if len(trimmed) == 0 || strings.HasPrefix(trimmed, "#") { continue } decodedObj, _, err := decoder.Decode(b, nil, nil) if err != nil { if !(runtime.IsMissingVersion(err) || runtime.IsMissingKind(err) || runtime.IsNotRegisteredError(err)) { return nil, policyLoadError{path, i, b, err} } unversionedLines++ // Migrate unversioned policy object oldPolicy := &v0.Policy{}
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Oct 11 03:11:30 UTC 2021 - 7.4K bytes - Viewed (0) -
pkg/kube/client.go
} } return nil } func (c *client) ssapplyYAML(cfg string, namespace string, dryRun bool) error { obj, dr, err := c.buildObject(cfg, namespace) if err != nil { if runtime.IsMissingKind(err) { log.Infof("skip applying, not a Kubernetes kind") return nil } return err } data, err := json.Marshal(obj) if err != nil { return err }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Apr 25 14:44:17 UTC 2024 - 39K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/runtime/scheme_test.go
}) t.Run("Verify that unstructured types must have V and K set", func(t *testing.T) { emptyObj := &runtimetesting.Unstructured{Object: make(map[string]interface{})} if _, _, err := scheme.ObjectKinds(emptyObj); !runtime.IsMissingKind(err) { t.Errorf("unexpected error: %v", err) } emptyObj.SetGroupVersionKind(schema.GroupVersionKind{Kind: "Test"}) if _, _, err := scheme.ObjectKinds(emptyObj); !runtime.IsMissingVersion(err) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 12 15:48:03 UTC 2023 - 38.2K bytes - Viewed (0)