mirror of
https://github.com/open-cluster-management-io/ocm.git
synced 2026-02-14 10:00:11 +00:00
Some checks failed
Post / coverage (push) Failing after 38m56s
Post / images (amd64, addon-manager) (push) Failing after 8m3s
Post / images (amd64, placement) (push) Failing after 7m33s
Post / images (amd64, registration) (push) Failing after 7m43s
Post / images (amd64, registration-operator) (push) Failing after 7m36s
Post / images (amd64, work) (push) Failing after 7m39s
Post / images (arm64, addon-manager) (push) Failing after 7m56s
Post / images (arm64, placement) (push) Failing after 7m42s
Post / images (arm64, registration) (push) Failing after 7m51s
Post / images (arm64, registration-operator) (push) Failing after 7m43s
Post / images (arm64, work) (push) Failing after 7m46s
Post / image manifest (addon-manager) (push) Has been skipped
Post / image manifest (placement) (push) Has been skipped
Post / image manifest (registration) (push) Has been skipped
Post / image manifest (registration-operator) (push) Has been skipped
Post / image manifest (work) (push) Has been skipped
Post / trigger clusteradm e2e (push) Has been skipped
Scorecard supply-chain security / Scorecard analysis (push) Failing after 1m24s
Signed-off-by: Wei Liu <liuweixa@redhat.com>
42 lines
1.2 KiB
Go
42 lines
1.2 KiB
Go
// Copyright Contributors to the Open Cluster Management project
|
|
package v1
|
|
|
|
import (
|
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
"k8s.io/apimachinery/pkg/runtime"
|
|
"k8s.io/apimachinery/pkg/runtime/schema"
|
|
)
|
|
|
|
var (
|
|
GroupName = "work.open-cluster-management.io"
|
|
GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"}
|
|
schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
|
|
// Install is a function which adds this version to a scheme
|
|
Install = schemeBuilder.AddToScheme
|
|
|
|
// SchemeGroupVersion generated code relies on this name
|
|
// Deprecated
|
|
SchemeGroupVersion = GroupVersion
|
|
// AddToScheme exists solely to keep the old generators creating valid code
|
|
// DEPRECATED
|
|
AddToScheme = schemeBuilder.AddToScheme
|
|
)
|
|
|
|
// Resource generated code relies on this being here, but it logically belongs to the group
|
|
// DEPRECATED
|
|
func Resource(resource string) schema.GroupResource {
|
|
return schema.GroupResource{Group: GroupName, Resource: resource}
|
|
}
|
|
|
|
// Adds the list of known types to api.Scheme.
|
|
func addKnownTypes(scheme *runtime.Scheme) error {
|
|
scheme.AddKnownTypes(GroupVersion,
|
|
&ManifestWork{},
|
|
&ManifestWorkList{},
|
|
&AppliedManifestWork{},
|
|
&AppliedManifestWorkList{},
|
|
)
|
|
metav1.AddToGroupVersion(scheme, GroupVersion)
|
|
return nil
|
|
}
|