feat: kubesphere 4.0 (#6115)
* feat: kubesphere 4.0 Signed-off-by: ci-bot <ci-bot@kubesphere.io> * feat: kubesphere 4.0 Signed-off-by: ci-bot <ci-bot@kubesphere.io> --------- Signed-off-by: ci-bot <ci-bot@kubesphere.io> Co-authored-by: ks-ci-bot <ks-ci-bot@example.com> Co-authored-by: joyceliu <joyceliu@yunify.com>
This commit is contained in:
committed by
GitHub
parent
b5015ec7b9
commit
447a51f08b
29
pkg/scheme/scheme.go
Normal file
29
pkg/scheme/scheme.go
Normal file
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Please refer to the LICENSE file in the root directory of the project.
|
||||
* https://github.com/kubesphere/kubesphere/blob/master/LICENSE
|
||||
*/
|
||||
|
||||
package scheme
|
||||
|
||||
import (
|
||||
apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/serializer"
|
||||
clientgoscheme "k8s.io/client-go/kubernetes/scheme"
|
||||
|
||||
kubespherescheme "kubesphere.io/client-go/kubesphere/scheme"
|
||||
)
|
||||
|
||||
// Scheme contains all types of custom Scheme and kubernetes client-go Scheme.
|
||||
var Scheme = runtime.NewScheme()
|
||||
var Codecs = serializer.NewCodecFactory(Scheme)
|
||||
|
||||
func init() {
|
||||
// register common meta types into schemas.
|
||||
metav1.AddToGroupVersion(Scheme, metav1.SchemeGroupVersion)
|
||||
|
||||
_ = clientgoscheme.AddToScheme(Scheme)
|
||||
_ = apiextensionsv1.AddToScheme(Scheme)
|
||||
_ = kubespherescheme.AddToScheme(Scheme)
|
||||
}
|
||||
Reference in New Issue
Block a user