forked from hswaw/hscloud
k8s.io/apimachinery: bypass https://github.com/kubernetes/kubernetes/issues/87675
For us this manifests when doing
kubecfg update cluster/kube/cluster.libsonnet
To be precise: when hitting the Ceph/Rook CRD definition.
This is a weird bug. I've seen it manifest earlier on NixOS, but I am
now also seeing it on Gentoo. I've thought that it was because of Go API
breakage, but I've quickly tried to specify older toolchain versions,
but that didn't seem to help? :/
Regardless, I've applied a patch by rnb [1] that seems to fix this. I
also have a suspicion that updating to a newer k8s version might just
fix this, that's why I'm not not too concerned about this for now.
[1] - a32521024f
Change-Id: Id66e3c0bd56e84d785e1baeca86373aa2d0eb6f9
master
parent
02aae3628c
commit
9d738cedc3
|
@ -496,8 +496,10 @@ go_repository(
|
|||
go_repository(
|
||||
name = "io_k8s_apimachinery",
|
||||
build_file_proto_mode = "disable",
|
||||
commit = "08e4eafd6d11",
|
||||
commit = "731dcecc205498f52a21b12e311af095efb4b188",
|
||||
importpath = "k8s.io/apimachinery",
|
||||
patches = ["//third_party/go/k8s-apimachinery:fix-kubernetes-bug-87675.patch"],
|
||||
patch_args = ["-p1"],
|
||||
)
|
||||
|
||||
go_repository(
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
diff --git a/pkg/runtime/converter.go b/pkg/runtime/converter.go
|
||||
index b3e8a53..2489822 100644
|
||||
--- a/pkg/runtime/converter.go
|
||||
+++ b/pkg/runtime/converter.go
|
||||
@@ -191,6 +191,9 @@ func fromUnstructured(sv, dv reflect.Value) error {
|
||||
reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
|
||||
dv.Set(sv.Convert(dt))
|
||||
return nil
|
||||
+ case reflect.Float32, reflect.Float64:
|
||||
+ dv.Set(sv.Convert(dt))
|
||||
+ return nil
|
||||
}
|
||||
case reflect.Float32, reflect.Float64:
|
||||
switch dt.Kind() {
|
Loading…
Reference in New Issue