mirror of
https://github.com/kubernetes/sample-controller.git
synced 2026-05-01 00:00:03 +08:00
Merge pull request #63565 from roycaihw/bump-kube-openapi-dep
Automatic merge from submit-queue (batch tested with PRs 59034, 63565, 63533). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Bump kube-openapi dependency picks: https://github.com/kubernetes/kube-openapi/pull/67 ref: https://github.com/kubernetes/kubernetes/issues/63494 **Release note**: ```release-note NONE ``` Kubernetes-commit: 3663dc757e05fb79f23a14ad4f2ba832d6e5962c
This commit is contained in:
+22
-15
@@ -58,6 +58,16 @@ func NewGetSubresourceAction(resource schema.GroupVersionResource, namespace, su
|
||||
return action
|
||||
}
|
||||
|
||||
func NewRootGetSubresourceAction(resource schema.GroupVersionResource, subresource, name string) GetActionImpl {
|
||||
action := GetActionImpl{}
|
||||
action.Verb = "get"
|
||||
action.Resource = resource
|
||||
action.Subresource = subresource
|
||||
action.Name = name
|
||||
|
||||
return action
|
||||
}
|
||||
|
||||
func NewRootListAction(resource schema.GroupVersionResource, kind schema.GroupVersionKind, opts interface{}) ListActionImpl {
|
||||
action := ListActionImpl{}
|
||||
action.Verb = "list"
|
||||
@@ -81,20 +91,6 @@ func NewListAction(resource schema.GroupVersionResource, kind schema.GroupVersio
|
||||
return action
|
||||
}
|
||||
|
||||
func NewListSubresourceAction(resource schema.GroupVersionResource, name, subresource string, kind schema.GroupVersionKind, namespace string, opts interface{}) ListActionImpl {
|
||||
action := ListActionImpl{}
|
||||
action.Verb = "list"
|
||||
action.Resource = resource
|
||||
action.Subresource = subresource
|
||||
action.Kind = kind
|
||||
action.Namespace = namespace
|
||||
action.Name = name
|
||||
labelSelector, fieldSelector, _ := ExtractFromListOptions(opts)
|
||||
action.ListRestrictions = ListRestrictions{labelSelector, fieldSelector}
|
||||
|
||||
return action
|
||||
}
|
||||
|
||||
func NewRootCreateAction(resource schema.GroupVersionResource, object runtime.Object) CreateActionImpl {
|
||||
action := CreateActionImpl{}
|
||||
action.Verb = "create"
|
||||
@@ -114,12 +110,23 @@ func NewCreateAction(resource schema.GroupVersionResource, namespace string, obj
|
||||
return action
|
||||
}
|
||||
|
||||
func NewCreateSubresourceAction(resource schema.GroupVersionResource, name, subresource string, namespace string, object runtime.Object) CreateActionImpl {
|
||||
func NewRootCreateSubresourceAction(resource schema.GroupVersionResource, name, subresource string, object runtime.Object) CreateActionImpl {
|
||||
action := CreateActionImpl{}
|
||||
action.Verb = "create"
|
||||
action.Resource = resource
|
||||
action.Subresource = subresource
|
||||
action.Name = name
|
||||
action.Object = object
|
||||
|
||||
return action
|
||||
}
|
||||
|
||||
func NewCreateSubresourceAction(resource schema.GroupVersionResource, name, subresource, namespace string, object runtime.Object) CreateActionImpl {
|
||||
action := CreateActionImpl{}
|
||||
action.Verb = "create"
|
||||
action.Resource = resource
|
||||
action.Namespace = namespace
|
||||
action.Subresource = subresource
|
||||
action.Name = name
|
||||
action.Object = object
|
||||
|
||||
|
||||
Reference in New Issue
Block a user