mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-14 13:45:06 +00:00
Support subpath on GET for GetterWithOptions
Allows REST consumers to build paths like: /api/v1beta3/namespaces/foo/webhookresource/<name>/<encodedsecretinurl> Also fixes parameter exposure for subresources (was only fixed for v1beta3).
This commit is contained in:
@@ -110,6 +110,8 @@ func (r *BindingREST) New() runtime.Object {
|
||||
return &api.Binding{}
|
||||
}
|
||||
|
||||
var _ = rest.Creater(&BindingREST{})
|
||||
|
||||
// Create ensures a pod is bound to a specific host.
|
||||
func (r *BindingREST) Create(ctx api.Context, obj runtime.Object) (out runtime.Object, err error) {
|
||||
binding := obj.(*api.Binding)
|
||||
@@ -197,6 +199,9 @@ type LogREST struct {
|
||||
kubeletConn client.ConnectionInfoGetter
|
||||
}
|
||||
|
||||
// LogREST implements GetterWithOptions
|
||||
var _ = rest.GetterWithOptions(&LogREST{})
|
||||
|
||||
// New creates a new Pod log options object
|
||||
func (r *LogREST) New() runtime.Object {
|
||||
return &api.PodLogOptions{}
|
||||
@@ -221,6 +226,6 @@ func (r *LogREST) Get(ctx api.Context, name string, opts runtime.Object) (runtim
|
||||
}
|
||||
|
||||
// NewGetOptions creates a new options object
|
||||
func (r *LogREST) NewGetOptions() runtime.Object {
|
||||
return &api.PodLogOptions{}
|
||||
func (r *LogREST) NewGetOptions() (runtime.Object, bool, string) {
|
||||
return &api.PodLogOptions{}, false, ""
|
||||
}
|
||||
|
Reference in New Issue
Block a user