|
| 1 | +package legacy |
| 2 | + |
| 3 | +import ( |
| 4 | + "k8s.io/apimachinery/pkg/apimachinery/registered" |
| 5 | + "k8s.io/apimachinery/pkg/runtime" |
| 6 | + "k8s.io/apimachinery/pkg/util/sets" |
| 7 | + |
| 8 | + appsapi "github.com/openshift/origin/pkg/apps/apis/apps" |
| 9 | + appsapiv1 "github.com/openshift/origin/pkg/apps/apis/apps/v1" |
| 10 | + authorizationapi "github.com/openshift/origin/pkg/authorization/apis/authorization" |
| 11 | + authorizationapiv1 "github.com/openshift/origin/pkg/authorization/apis/authorization/v1" |
| 12 | + buildapi "github.com/openshift/origin/pkg/build/apis/build" |
| 13 | + buildapiv1 "github.com/openshift/origin/pkg/build/apis/build/v1" |
| 14 | + imageapi "github.com/openshift/origin/pkg/image/apis/image" |
| 15 | + imageapiv1 "github.com/openshift/origin/pkg/image/apis/image/v1" |
| 16 | + networkapi "github.com/openshift/origin/pkg/network/apis/network" |
| 17 | + networkapiv1 "github.com/openshift/origin/pkg/network/apis/network/v1" |
| 18 | + oauthapi "github.com/openshift/origin/pkg/oauth/apis/oauth" |
| 19 | + oauthapiv1 "github.com/openshift/origin/pkg/oauth/apis/oauth/v1" |
| 20 | + projectapi "github.com/openshift/origin/pkg/project/apis/project" |
| 21 | + projectapiv1 "github.com/openshift/origin/pkg/project/apis/project/v1" |
| 22 | + quotaapi "github.com/openshift/origin/pkg/quota/apis/quota" |
| 23 | + quotaapiv1 "github.com/openshift/origin/pkg/quota/apis/quota/v1" |
| 24 | + routeapi "github.com/openshift/origin/pkg/route/apis/route" |
| 25 | + routeapiv1 "github.com/openshift/origin/pkg/route/apis/route/v1" |
| 26 | + securityapi "github.com/openshift/origin/pkg/security/apis/security" |
| 27 | + securityapiv1 "github.com/openshift/origin/pkg/security/apis/security/v1" |
| 28 | + templateapi "github.com/openshift/origin/pkg/template/apis/template" |
| 29 | + templateapiv1 "github.com/openshift/origin/pkg/template/apis/template/v1" |
| 30 | + userapi "github.com/openshift/origin/pkg/user/apis/user" |
| 31 | + userapiv1 "github.com/openshift/origin/pkg/user/apis/user/v1" |
| 32 | +) |
| 33 | + |
| 34 | +func InstallLegacyApps(scheme *runtime.Scheme, registry *registered.APIRegistrationManager) { |
| 35 | + InstallLegacy(appsapi.GroupName, appsapi.AddToSchemeInCoreGroup, appsapiv1.AddToSchemeInCoreGroup, sets.NewString(), registry, scheme) |
| 36 | +} |
| 37 | + |
| 38 | +func InstallLegacyAuthorization(scheme *runtime.Scheme, registry *registered.APIRegistrationManager) { |
| 39 | + InstallLegacy(authorizationapi.GroupName, authorizationapi.AddToSchemeInCoreGroup, authorizationapiv1.AddToSchemeInCoreGroup, |
| 40 | + sets.NewString("ClusterRole", "ClusterRoleBinding", "ClusterPolicy", "ClusterPolicyBinding", "ResourceAccessReviewResponse", "SubjectAccessReviewResponse"), |
| 41 | + registry, scheme, |
| 42 | + ) |
| 43 | +} |
| 44 | + |
| 45 | +func InstallLegacyBuild(scheme *runtime.Scheme, registry *registered.APIRegistrationManager) { |
| 46 | + InstallLegacy(buildapi.GroupName, buildapi.AddToSchemeInCoreGroup, buildapiv1.AddToSchemeInCoreGroup, sets.NewString(), registry, scheme) |
| 47 | +} |
| 48 | + |
| 49 | +func InstallLegacyImage(scheme *runtime.Scheme, registry *registered.APIRegistrationManager) { |
| 50 | + InstallLegacy(imageapi.GroupName, imageapi.AddToSchemeInCoreGroup, imageapiv1.AddToSchemeInCoreGroup, |
| 51 | + sets.NewString("Image", "ImageSignature"), |
| 52 | + registry, scheme, |
| 53 | + ) |
| 54 | +} |
| 55 | + |
| 56 | +func InstallLegacyNetwork(scheme *runtime.Scheme, registry *registered.APIRegistrationManager) { |
| 57 | + InstallLegacy(networkapi.GroupName, networkapi.AddToSchemeInCoreGroup, networkapiv1.AddToSchemeInCoreGroup, |
| 58 | + sets.NewString("ClusterNetwork", "HostSubnet", "NetNamespace"), |
| 59 | + registry, scheme, |
| 60 | + ) |
| 61 | +} |
| 62 | + |
| 63 | +func InstallLegacyOAuth(scheme *runtime.Scheme, registry *registered.APIRegistrationManager) { |
| 64 | + InstallLegacy(oauthapi.GroupName, oauthapi.AddToSchemeInCoreGroup, oauthapiv1.AddToSchemeInCoreGroup, |
| 65 | + sets.NewString("OAuthAccessToken", "OAuthAuthorizeToken", "OAuthClient", "OAuthClientAuthorization"), |
| 66 | + registry, scheme, |
| 67 | + ) |
| 68 | +} |
| 69 | + |
| 70 | +func InstallLegacyProject(scheme *runtime.Scheme, registry *registered.APIRegistrationManager) { |
| 71 | + InstallLegacy(projectapi.GroupName, projectapi.AddToSchemeInCoreGroup, projectapiv1.AddToSchemeInCoreGroup, |
| 72 | + sets.NewString("Project", "ProjectRequest"), |
| 73 | + registry, scheme, |
| 74 | + ) |
| 75 | +} |
| 76 | + |
| 77 | +func InstallLegacyQuota(scheme *runtime.Scheme, registry *registered.APIRegistrationManager) { |
| 78 | + InstallLegacy(quotaapi.GroupName, quotaapi.AddToSchemeInCoreGroup, quotaapiv1.AddToSchemeInCoreGroup, |
| 79 | + sets.NewString("ClusterResourceQuota"), |
| 80 | + registry, scheme, |
| 81 | + ) |
| 82 | +} |
| 83 | + |
| 84 | +func InstallLegacyRoute(scheme *runtime.Scheme, registry *registered.APIRegistrationManager) { |
| 85 | + InstallLegacy(routeapi.GroupName, routeapi.AddToSchemeInCoreGroup, routeapiv1.AddToSchemeInCoreGroup, sets.NewString(), registry, scheme) |
| 86 | +} |
| 87 | + |
| 88 | +func InstallLegacySecurity(scheme *runtime.Scheme, registry *registered.APIRegistrationManager) { |
| 89 | + InstallLegacy(securityapi.GroupName, securityapi.AddToSchemeInCoreGroup, securityapiv1.AddToSchemeInCoreGroup, |
| 90 | + sets.NewString("SecurityContextConstraints"), |
| 91 | + registry, scheme, |
| 92 | + ) |
| 93 | +} |
| 94 | + |
| 95 | +func InstallLegacyTemplate(scheme *runtime.Scheme, registry *registered.APIRegistrationManager) { |
| 96 | + InstallLegacy(templateapi.GroupName, templateapi.AddToSchemeInCoreGroup, templateapiv1.AddToSchemeInCoreGroup, |
| 97 | + sets.NewString("BrokerTemplateInstance"), |
| 98 | + registry, scheme, |
| 99 | + ) |
| 100 | +} |
| 101 | + |
| 102 | +func InstallLegacyUser(scheme *runtime.Scheme, registry *registered.APIRegistrationManager) { |
| 103 | + InstallLegacy(userapi.GroupName, userapi.AddToSchemeInCoreGroup, userapiv1.AddToSchemeInCoreGroup, |
| 104 | + sets.NewString("User", "Identity", "UserIdentityMapping", "Group"), |
| 105 | + registry, scheme, |
| 106 | + ) |
| 107 | +} |
0 commit comments