Revert "Remove unwanted schemes"

This reverts commit 445cf2eb8c.
This commit is contained in:
Vibhav Bobade 2020-06-24 05:44:54 +05:30
parent d64197d90b
commit 8dbb07b094
3 changed files with 15 additions and 1 deletions

View File

@ -225,10 +225,10 @@ func filterGKVsFromAddToScheme(gvks []schema.GroupVersionKind) []schema.GroupVer
{Kind: "Pod", Version: matchAnyValue},
{Kind: "ConfigMap", Version: matchAnyValue},
{Kind: "Service", Version: matchAnyValue},
{Group: "apps", Kind: "Deployment", Version: matchAnyValue},
// Openshift Resources
{Group: "route.openshift.io", Kind: "Route", Version: matchAnyValue},
{Group: "image.openshift.io", Kind: "ImageStream", Version: matchAnyValue},
{Group: "apps.openshift.io", Kind: "DeploymentConfig", Version: matchAnyValue},
// Custom Resources
{Group: "jenkins.io", Kind: "Jenkins", Version: matchAnyValue},
{Group: "jenkins.io", Kind: "JenkinsImage", Version: matchAnyValue},

View File

@ -88,6 +88,16 @@ rules:
- get
- list
- watch
- apiGroups:
- "route.openshift.io"
resources:
- routes
verbs:
- get
- list
- watch
- create
- update
- apiGroups:
- "image.openshift.io"
resources:

View File

@ -2,6 +2,8 @@ package apis
import (
"github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2"
routev1 "github.com/openshift/api/route/v1"
appsv1 "k8s.io/api/apps/v1"
"k8s.io/apimachinery/pkg/runtime"
)
@ -17,4 +19,6 @@ func AddToScheme(s *runtime.Scheme) error {
func init() {
// Register the types with the Scheme so the components can map objects to GroupVersionKinds and back
AddToSchemes = append(AddToSchemes, v1alpha2.SchemeBuilder.AddToScheme)
AddToSchemes = append(AddToSchemes, routev1.Install)
AddToSchemes = append(AddToSchemes, appsv1.AddToScheme)
}