Fix a problem with multiple APIs clobbering each other in registration.

This commit is contained in:
Brendan Burns 2016-07-02 22:27:09 -07:00
parent 3313d68066
commit cf5010ca6e

View File

@ -22,6 +22,7 @@ import (
"os"
"sort"
"strings"
"sync"
"github.com/golang/glog"
@ -207,11 +208,7 @@ func AddThirdPartyAPIGroupVersions(gvs ...unversioned.GroupVersion) []unversione
}
RegisterVersions(filteredGVs)
EnableVersions(filteredGVs...)
next := make([]unversioned.GroupVersion, len(gvs))
for ix := range filteredGVs {
next[ix] = filteredGVs[ix]
}
thirdPartyGroupVersions = next
thirdPartyGroupVersions = append(thirdPartyGroupVersions, filteredGVs...)
return skippedGVs
}