mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-06 07:57:35 +00:00
address lavalamp's comments
This commit is contained in:
@@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This is made a separate package and should only be imported by tests, because
|
||||
// it imports testapi
|
||||
package fake
|
||||
|
||||
import (
|
||||
|
||||
@@ -33,7 +33,6 @@ import (
|
||||
"github.com/golang/glog"
|
||||
"k8s.io/kubernetes/pkg/api"
|
||||
"k8s.io/kubernetes/pkg/api/latest"
|
||||
"k8s.io/kubernetes/pkg/api/registered"
|
||||
"k8s.io/kubernetes/pkg/runtime"
|
||||
"k8s.io/kubernetes/pkg/util"
|
||||
"k8s.io/kubernetes/pkg/util/sets"
|
||||
@@ -142,7 +141,7 @@ func New(c *Config) (*Client, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if len(registered.GroupVersionsForGroup("experimental")) == 0 {
|
||||
if _, err := latest.Group("experimental"); err != nil {
|
||||
return &Client{RESTClient: client, ExperimentalClient: nil}, nil
|
||||
}
|
||||
experimentalConfig := *c
|
||||
|
||||
@@ -16,6 +16,7 @@ limitations under the License.
|
||||
|
||||
package unversioned
|
||||
|
||||
// These imports are the API groups the client will support.
|
||||
import (
|
||||
_ "k8s.io/kubernetes/pkg/api/install"
|
||||
_ "k8s.io/kubernetes/pkg/expapi/install"
|
||||
|
||||
Reference in New Issue
Block a user