Skip to content

Commit

Permalink
Register necessary options objects in policy internal GV
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtek-t committed Dec 29, 2016
1 parent f1c8b75 commit c6a55d7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
7 changes: 7 additions & 0 deletions pkg/apis/authorization/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ limitations under the License.
package authorization

import (
"k8s.io/kubernetes/pkg/api"
metav1 "k8s.io/kubernetes/pkg/apis/meta/v1"
"k8s.io/kubernetes/pkg/runtime"
"k8s.io/kubernetes/pkg/runtime/schema"
)
Expand Down Expand Up @@ -44,6 +46,11 @@ var (

func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion,
&api.ListOptions{},
&api.DeleteOptions{},
&metav1.ExportOptions{},
&metav1.GetOptions{},

&SelfSubjectAccessReview{},
&SubjectAccessReview{},
&LocalSubjectAccessReview{},
Expand Down
7 changes: 6 additions & 1 deletion pkg/apis/policy/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package policy

import (
"k8s.io/kubernetes/pkg/api"
metav1 "k8s.io/kubernetes/pkg/apis/meta/v1"
"k8s.io/kubernetes/pkg/runtime"
"k8s.io/kubernetes/pkg/runtime/schema"
)
Expand Down Expand Up @@ -47,9 +48,13 @@ var (
func addKnownTypes(scheme *runtime.Scheme) error {
// TODO this gets cleaned up when the types are fixed
scheme.AddKnownTypes(SchemeGroupVersion,
&api.ListOptions{},
&api.DeleteOptions{},
&metav1.ExportOptions{},
&metav1.GetOptions{},

&PodDisruptionBudget{},
&PodDisruptionBudgetList{},
&api.ListOptions{},
&Eviction{},
)
return nil
Expand Down

0 comments on commit c6a55d7

Please sign in to comment.