forked from openshift/origin
-
Notifications
You must be signed in to change notification settings - Fork 1
/
register.go
44 lines (38 loc) · 1.07 KB
/
register.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package security
import (
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/kubernetes/pkg/apis/core"
)
const (
GroupName = "security.openshift.io"
)
var (
schemeBuilder = runtime.NewSchemeBuilder(
addKnownTypes,
core.AddToScheme,
)
Install = schemeBuilder.AddToScheme
// DEPRECATED kept for generated code
SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
// DEPRECATED kept for generated code
AddToScheme = schemeBuilder.AddToScheme
)
// Resource kept for generated code
// DEPRECATED
func Resource(resource string) schema.GroupResource {
return SchemeGroupVersion.WithResource(resource).GroupResource()
}
// Adds the list of known types to api.Scheme.
func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion,
&SecurityContextConstraints{},
&SecurityContextConstraintsList{},
&PodSecurityPolicySubjectReview{},
&PodSecurityPolicySelfSubjectReview{},
&PodSecurityPolicyReview{},
&RangeAllocation{},
&RangeAllocationList{},
)
return nil
}