...

Source file src/github.com/openshift/api/config/v1/register.go

Documentation: github.com/openshift/api/config/v1

     1  package v1
     2  
     3  import (
     4  	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
     5  	"k8s.io/apimachinery/pkg/runtime"
     6  	"k8s.io/apimachinery/pkg/runtime/schema"
     7  )
     8  
     9  var (
    10  	GroupName     = "config.openshift.io"
    11  	GroupVersion  = schema.GroupVersion{Group: GroupName, Version: "v1"}
    12  	schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
    13  	// Install is a function which adds this version to a scheme
    14  	Install = schemeBuilder.AddToScheme
    15  
    16  	// SchemeGroupVersion generated code relies on this name
    17  	// Deprecated
    18  	SchemeGroupVersion = GroupVersion
    19  	// AddToScheme exists solely to keep the old generators creating valid code
    20  	// DEPRECATED
    21  	AddToScheme = schemeBuilder.AddToScheme
    22  )
    23  
    24  // Resource generated code relies on this being here, but it logically belongs to the group
    25  // DEPRECATED
    26  func Resource(resource string) schema.GroupResource {
    27  	return schema.GroupResource{Group: GroupName, Resource: resource}
    28  }
    29  
    30  // Adds the list of known types to api.Scheme.
    31  func addKnownTypes(scheme *runtime.Scheme) error {
    32  	scheme.AddKnownTypes(GroupVersion,
    33  		&APIServer{},
    34  		&APIServerList{},
    35  		&Authentication{},
    36  		&AuthenticationList{},
    37  		&Build{},
    38  		&BuildList{},
    39  		&ClusterOperator{},
    40  		&ClusterOperatorList{},
    41  		&ClusterVersion{},
    42  		&ClusterVersionList{},
    43  		&Console{},
    44  		&ConsoleList{},
    45  		&DNS{},
    46  		&DNSList{},
    47  		&FeatureGate{},
    48  		&FeatureGateList{},
    49  		&Image{},
    50  		&ImageList{},
    51  		&Infrastructure{},
    52  		&InfrastructureList{},
    53  		&Ingress{},
    54  		&IngressList{},
    55  		&Node{},
    56  		&NodeList{},
    57  		&Network{},
    58  		&NetworkList{},
    59  		&OAuth{},
    60  		&OAuthList{},
    61  		&OperatorHub{},
    62  		&OperatorHubList{},
    63  		&Project{},
    64  		&ProjectList{},
    65  		&Proxy{},
    66  		&ProxyList{},
    67  		&Scheduler{},
    68  		&SchedulerList{},
    69  		&ImageContentPolicy{},
    70  		&ImageContentPolicyList{},
    71  		&ImageDigestMirrorSet{},
    72  		&ImageDigestMirrorSetList{},
    73  		&ImageTagMirrorSet{},
    74  		&ImageTagMirrorSetList{},
    75  	)
    76  	metav1.AddToGroupVersion(scheme, GroupVersion)
    77  	return nil
    78  }
    79  

View as plain text