apimachinery
apimachinery copied to clipboard
[@HEAD](https://github.com/kubernetes/apimachinery/commit/080c0c77fab5f76acfa0c31e9e59411ecc861973) ```sh ❯ go run golang.org/x/tools/go/analysis/passes/nilness/cmd/nilness@afc6aad76eb1194c038c653531eef344468d2ac4 ./... /Users/thomas/code/github.com/kubernetes/apimachinery/pkg/util/jsonmergepatch/patch.go:139:54: impossible condition: non-nil == nil /Users/thomas/code/github.com/kubernetes/apimachinery/pkg/util/httpstream/spdy/upgrade_test.go:64:12: impossible condition: non-nil == nil /Users/thomas/code/github.com/kubernetes/apimachinery/pkg/util/yaml/decoder_test.go:360:13: tautological condition: non-nil != nil exit status 3 ``` This...
Blackduck scan on 0.23.1 resulted in BD vulnerability due to indirect dependency of golang.org/x/text v0.3.2 k8s.io/apimachinery v0.23.1 -> github.com/onsi/ginkgo v1.14.0 -> golang.org/x/text v0.3.2 The same issue should be happening on...
when I am using the `RemoveNestedField` it doesn't work well with `yaml.Unmarshal` with a `map[string]interface{}` see example here https://go.dev/play/p/TZ50sPYCE5f running the code with `unstructured.RemoveNestedField(m, "b")` does work as the toplevel...
[strategicpatch/patch.go::handleMapDiff](https://github.com/kubernetes/apimachinery/blob/080c0c77fab5f76acfa0c31e9e59411ecc861973/pkg/util/strategicpatch/patch.go#L263) assumes that the `LookupPatchMeta` returned by [util/strategicpatch/meta.go::LookupPatchMetadataForStruct](https://github.com/kubernetes/apimachinery/blob/080c0c77fab5f76acfa0c31e9e59411ecc861973/pkg/util/strategicpatch/meta.go#L161) (for objects of type `PatchMetaFromOpenAPI`) only returns `nil`when it also returns `err != nil`which does not hold. Return value ``` go func...
Currently getting this error, version of sigs.k8s.io/structured-merge-diff is v4.2.2. ``` go/pkg/mod/k8s.io/[email protected]/pkg/util/managedfields/gvkparser.go:62:39: cannot use smdschema.Schema{…} (value of type "sigs.k8s.io/structured-merge-diff/v4/schema".Schema) as type *"sigs.k8s.io/structured-merge-diff/v4/schema".Schema in struct literal ```
My use case is determining if one `unstructured.Unstructured` object is contained within the other. This would enable me to determine if two objects are equal, modulo the fields that are...
I generated a project as instruction here https://book.kubebuilder.io/quick-start.html#create-a-project 1. `kubebuilder init --domain my.domain --repo my.domain/guestbook` 2. `kubebuilder create api --group webapp --version v1 --kind Guestbook` 3. `make manifests` 4. `make...
Wouldn't it be easier if `metav1.HasAnnotation` also returned value or just value of the annotation
In most of cases when I use `HasAnnotation` to figure out if a an annotation is set, I write another statement to actually get the value of the annotation. Wouldn't...
We have found the following issue after Protecode scanning the v0.24.1 version of apimachinery: "Authorization Bypass Through User-Controlled Key in GitHub repository emicklei/go-restful prior to v3.8.0.", and go-restful is a...
Despite validation of type=duration being [documented](https://github.com/kubernetes/apiextensions-apiserver/blob/29400d7010f44f7d6ad2c6762604185143382598/pkg/apis/apiextensions/v1/types_jsonschema.go#L51) as parsed by time.ParseDuration, which is [what the unmarshaller does](https://github.com/kubernetes/apimachinery/blob/df993592a122931b8aac4db57689e09458a2332c/pkg/apis/meta/v1/duration.go#L39), it is actually [parsed](https://github.com/kubernetes/apiextensions-apiserver/blob/29400d7010f44f7d6ad2c6762604185143382598/pkg/apiserver/schema/cel/values.go#L135) by strfmt.ParseDuration, which is more lenient in that it [accepts...