diff --git a/hack/godeps/godep-save.sh b/hack/godeps/godep-save.sh index 4aba77bbc224..97b46af4fb74 100755 --- a/hack/godeps/godep-save.sh +++ b/hack/godeps/godep-save.sh @@ -31,3 +31,5 @@ godep save ./... godep::remove_staging_from_json git checkout -- ${MINIKUBE_ROOT}/vendor/golang.org/x/sys/windows + +git apply ${MINIKUBE_ROOT}/hack/tpr-patch.diff diff --git a/hack/tpr-patch.diff b/hack/tpr-patch.diff new file mode 100644 index 000000000000..c2db534e5549 --- /dev/null +++ b/hack/tpr-patch.diff @@ -0,0 +1,17 @@ +diff --git a/vendor/k8s.io/apimachinery/pkg/apimachinery/registered/registered.go b/vendor/k8s.io/apimachinery/pkg/apimachinery/registered/registered.go +index f2e32c88c..f1c96c43d 100644 +--- a/vendor/k8s.io/apimachinery/pkg/apimachinery/registered/registered.go ++++ b/vendor/k8s.io/apimachinery/pkg/apimachinery/registered/registered.go +@@ -282,7 +282,11 @@ func (m *APIRegistrationManager) RESTMapper(versionPatterns ...schema.GroupVersi + for enabledVersion := range m.enabledVersions { + if !unionedGroups.Has(enabledVersion.Group) { + unionedGroups.Insert(enabledVersion.Group) +- groupMeta := m.groupMetaMap[enabledVersion.Group] ++ groupMeta, found := m.groupMetaMap[enabledVersion.Group] ++ // TODO(r2d4): hack until tprs are decoupled from restMapper ++ if !found { ++ glog.Warningf("Could not find groupMeta for %s", enabledVersion.Group) ++ } + unionMapper = append(unionMapper, groupMeta.RESTMapper) + } + } diff --git a/vendor/k8s.io/apimachinery/pkg/apimachinery/registered/registered.go b/vendor/k8s.io/apimachinery/pkg/apimachinery/registered/registered.go index f2e32c88cdf1..f1c96c43d4ed 100644 --- a/vendor/k8s.io/apimachinery/pkg/apimachinery/registered/registered.go +++ b/vendor/k8s.io/apimachinery/pkg/apimachinery/registered/registered.go @@ -282,7 +282,11 @@ func (m *APIRegistrationManager) RESTMapper(versionPatterns ...schema.GroupVersi for enabledVersion := range m.enabledVersions { if !unionedGroups.Has(enabledVersion.Group) { unionedGroups.Insert(enabledVersion.Group) - groupMeta := m.groupMetaMap[enabledVersion.Group] + groupMeta, found := m.groupMetaMap[enabledVersion.Group] + // TODO(r2d4): hack until tprs are decoupled from restMapper + if !found { + glog.Warningf("Could not find groupMeta for %s", enabledVersion.Group) + } unionMapper = append(unionMapper, groupMeta.RESTMapper) } }