Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
This commit updates the dependencies to the latest versions.
This removes the special "resource" and "subresource" context
information, in favor of the new RequestInfo context information,
which includes resource and subresource.
  • Loading branch information
DirectXMan12 committed Jun 24, 2017
1 parent daee026 commit 53814de
Show file tree
Hide file tree
Showing 8 changed files with 174 additions and 293 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.swp
*~
sample-main
vendor
121 changes: 101 additions & 20 deletions glide.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/apiserver/apiserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func (c *Config) SkipComplete() completedConfig {

// New returns a new instance of CustomMetricsAdapterServer from the given config.
func (c completedConfig) New(cmProvider provider.CustomMetricsProvider) (*CustomMetricsAdapterServer, error) {
genericServer, err := c.Config.GenericConfig.SkipComplete().New() // completion is done in Complete, no need for a second time
genericServer, err := c.Config.GenericConfig.SkipComplete().New(genericapiserver.EmptyDelegate) // completion is done in Complete, no need for a second time
if err != nil {
return nil, err
}
Expand Down
9 changes: 5 additions & 4 deletions pkg/apiserver/cmapis.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"k8s.io/apimachinery/pkg/runtime/schema"
genericapi "k8s.io/apiserver/pkg/endpoints"
genericapiserver "k8s.io/apiserver/pkg/server"
"k8s.io/apiserver/pkg/endpoints/discovery"

specificapi "k8s.io/custom-metrics-boilerplate/pkg/apiserver/installer"
"k8s.io/custom-metrics-boilerplate/pkg/provider"
Expand All @@ -43,19 +44,19 @@ func (s *CustomMetricsAdapterServer) InstallCustomMetricsAPI() error {
Version: groupMeta.GroupVersion.Version,
}
apiGroup := metav1.APIGroup{
Name: groupMeta.GroupVersion.String(),
Name: groupMeta.GroupVersion.Group,
Versions: []metav1.GroupVersionForDiscovery{groupVersion},
PreferredVersion: preferredVersionForDiscovery,
}

cmAPI := s.cmAPI(groupMeta, &groupMeta.GroupVersion)

if err := cmAPI.InstallREST(s.GenericAPIServer.HandlerContainer.Container); err != nil {
if err := cmAPI.InstallREST(s.GenericAPIServer.Handler.GoRestfulContainer); err != nil {
return err
}

path := genericapiserver.APIGroupPrefix + "/" + groupMeta.GroupVersion.Group
s.GenericAPIServer.HandlerContainer.Add(genericapi.NewGroupWebService(s.GenericAPIServer.Serializer, path, apiGroup))
s.GenericAPIServer.DiscoveryGroupManager.AddGroup(apiGroup)
s.GenericAPIServer.Handler.GoRestfulContainer.Add(discovery.NewAPIGroupHandler(s.GenericAPIServer.Serializer, apiGroup).WebService())

return nil
}
Expand Down
48 changes: 0 additions & 48 deletions pkg/apiserver/installer/context/context.go

This file was deleted.

Loading

0 comments on commit 53814de

Please sign in to comment.