{"record":{"id":"c76d0465cf05e3ff","repo":"kubernetes/kops","slug":"object-did-not-have-groupversionkind-q","errorCode":null,"errorMessage":"object did not have GroupVersionKind: %q","messagePattern":"object did not have GroupVersionKind: %q","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/vfs_keystorereader.go","lineNumber":72,"sourceCode":"func (c *VFSKeystoreReader) buildPrivateKeyPoolPath(name string) vfs.Path {\n\treturn c.basedir.Join(\"private\", name)\n}\n\nfunc (c *VFSKeystoreReader) parseKeysetYaml(data []byte) (*kops.Keyset, bool, error) {\n\tdefaultReadVersion := v1alpha2.SchemeGroupVersion.WithKind(\"Keyset\")\n\n\tobject, gvk, err := kopscodecs.Decode(data, &defaultReadVersion)\n\tif err != nil {\n\t\treturn nil, false, fmt.Errorf(\"error parsing keyset: %v\", err)\n\t}\n\n\tkeyset, ok := object.(*kops.Keyset)\n\tif !ok {\n\t\treturn nil, false, fmt.Errorf(\"object was not a keyset, was a %T\", object)\n\t}\n\n\tif gvk == nil {\n\t\treturn nil, false, fmt.Errorf(\"object did not have GroupVersionKind: %q\", keyset.Name)\n\t}\n\n\treturn keyset, gvk.Version != keysetFormatLatest, nil\n}\n\n// loadKeyset loads a Keyset from the path.\n// Returns (nil, nil) if the file is not found\n// Bundles avoid the need for a list-files permission, which can be tricky on e.g. GCE\nfunc (c *VFSKeystoreReader) loadKeyset(ctx context.Context, p vfs.Path) (*Keyset, error) {\n\tbundlePath := p.Join(\"keyset.yaml\")\n\tdata, err := bundlePath.ReadFile(ctx)\n\tif err != nil {\n\t\tif os.IsNotExist(err) {\n\t\t\treturn nil, nil\n\t\t}\n\t\treturn nil, fmt.Errorf(\"unable to read bundle %q: %v\", p, err)\n\t}\n","sourceCodeStart":54,"sourceCodeEnd":90,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/vfs_keystorereader.go#L54-L90","documentation":"Error \"object did not have GroupVersionKind: %q\" thrown in kubernetes/kops.","triggerScenarios":"Thrown at upup/pkg/fi/vfs_keystorereader.go:72 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T07:17:12.445Z"}