Generate files
Signed-off-by: RainbowMango <renhongcai@huawei.com>
This commit is contained in:
parent
3d5358aa77
commit
c579ca4615
|
@ -0,0 +1,194 @@
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: apiextensions.k8s.io/v1
|
||||||
|
kind: CustomResourceDefinition
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
controller-gen.kubebuilder.io/version: v0.4.1
|
||||||
|
creationTimestamp: null
|
||||||
|
name: works.work.karmada.io
|
||||||
|
spec:
|
||||||
|
group: work.karmada.io
|
||||||
|
names:
|
||||||
|
kind: Work
|
||||||
|
listKind: WorkList
|
||||||
|
plural: works
|
||||||
|
singular: work
|
||||||
|
scope: Namespaced
|
||||||
|
versions:
|
||||||
|
- name: v1alpha1
|
||||||
|
schema:
|
||||||
|
openAPIV3Schema:
|
||||||
|
description: Work defines a list of resources to be deployed on the member
|
||||||
|
cluster.
|
||||||
|
properties:
|
||||||
|
apiVersion:
|
||||||
|
description: 'APIVersion defines the versioned schema of this representation
|
||||||
|
of an object. Servers should convert recognized schemas to the latest
|
||||||
|
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||||
|
type: string
|
||||||
|
kind:
|
||||||
|
description: 'Kind is a string value representing the REST resource this
|
||||||
|
object represents. Servers may infer this from the endpoint the client
|
||||||
|
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||||
|
type: string
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
spec:
|
||||||
|
description: Spec represents the desired behavior of Work.
|
||||||
|
properties:
|
||||||
|
workload:
|
||||||
|
description: Workload represents the manifest workload to be deployed
|
||||||
|
on managed cluster.
|
||||||
|
properties:
|
||||||
|
manifests:
|
||||||
|
description: Manifests represents a list of Kubernetes resources
|
||||||
|
to be deployed on the managed cluster.
|
||||||
|
items:
|
||||||
|
description: Manifest represents a resource to be deployed on
|
||||||
|
managed cluster.
|
||||||
|
type: object
|
||||||
|
x-kubernetes-preserve-unknown-fields: true
|
||||||
|
type: array
|
||||||
|
type: object
|
||||||
|
type: object
|
||||||
|
status:
|
||||||
|
description: Status represents the status of PropagationStatus.
|
||||||
|
properties:
|
||||||
|
conditions:
|
||||||
|
description: 'Conditions contain the different condition statuses
|
||||||
|
for this work. Valid condition types are: 1. Applied represents
|
||||||
|
workload in Work is applied successfully on a managed cluster. 2.
|
||||||
|
Progressing represents workload in Work is being applied on a managed
|
||||||
|
cluster. 3. Available represents workload in Work exists on the
|
||||||
|
managed cluster. 4. Degraded represents the current state of workload
|
||||||
|
does not match the desired state for a certain period.'
|
||||||
|
items:
|
||||||
|
description: "Condition contains details for one aspect of the current
|
||||||
|
state of this API Resource. --- This struct is intended for direct
|
||||||
|
use as an array at the field path .status.conditions. For example,
|
||||||
|
type FooStatus struct{ // Represents the observations of a
|
||||||
|
foo's current state. // Known .status.conditions.type are:
|
||||||
|
\"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type
|
||||||
|
\ // +patchStrategy=merge // +listType=map // +listMapKey=type
|
||||||
|
\ Conditions []metav1.Condition `json:\"conditions,omitempty\"
|
||||||
|
patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`
|
||||||
|
\n // other fields }"
|
||||||
|
properties:
|
||||||
|
lastTransitionTime:
|
||||||
|
description: lastTransitionTime is the last time the condition
|
||||||
|
transitioned from one status to another. This should be when
|
||||||
|
the underlying condition changed. If that is not known, then
|
||||||
|
using the time when the API field changed is acceptable.
|
||||||
|
format: date-time
|
||||||
|
type: string
|
||||||
|
message:
|
||||||
|
description: message is a human readable message indicating
|
||||||
|
details about the transition. This may be an empty string.
|
||||||
|
maxLength: 32768
|
||||||
|
type: string
|
||||||
|
observedGeneration:
|
||||||
|
description: observedGeneration represents the .metadata.generation
|
||||||
|
that the condition was set based upon. For instance, if .metadata.generation
|
||||||
|
is currently 12, but the .status.conditions[x].observedGeneration
|
||||||
|
is 9, the condition is out of date with respect to the current
|
||||||
|
state of the instance.
|
||||||
|
format: int64
|
||||||
|
minimum: 0
|
||||||
|
type: integer
|
||||||
|
reason:
|
||||||
|
description: reason contains a programmatic identifier indicating
|
||||||
|
the reason for the condition's last transition. Producers
|
||||||
|
of specific condition types may define expected values and
|
||||||
|
meanings for this field, and whether the values are considered
|
||||||
|
a guaranteed API. The value should be a CamelCase string.
|
||||||
|
This field may not be empty.
|
||||||
|
maxLength: 1024
|
||||||
|
minLength: 1
|
||||||
|
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
|
||||||
|
type: string
|
||||||
|
status:
|
||||||
|
description: status of the condition, one of True, False, Unknown.
|
||||||
|
enum:
|
||||||
|
- "True"
|
||||||
|
- "False"
|
||||||
|
- Unknown
|
||||||
|
type: string
|
||||||
|
type:
|
||||||
|
description: type of condition in CamelCase or in foo.example.com/CamelCase.
|
||||||
|
--- Many .condition.type values are consistent across resources
|
||||||
|
like Available, but because arbitrary conditions can be useful
|
||||||
|
(see .node.status.conditions), the ability to deconflict is
|
||||||
|
important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
|
||||||
|
maxLength: 316
|
||||||
|
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- lastTransitionTime
|
||||||
|
- message
|
||||||
|
- reason
|
||||||
|
- status
|
||||||
|
- type
|
||||||
|
type: object
|
||||||
|
type: array
|
||||||
|
manifestStatuses:
|
||||||
|
description: ManifestStatuses contains running status of manifests
|
||||||
|
in spec.
|
||||||
|
items:
|
||||||
|
description: ManifestStatus contains running status of a specific
|
||||||
|
manifest in spec.
|
||||||
|
properties:
|
||||||
|
identifier:
|
||||||
|
description: Identifier represents the identity of a resource
|
||||||
|
linking to manifests in spec.
|
||||||
|
properties:
|
||||||
|
group:
|
||||||
|
description: Group is the group of the resource.
|
||||||
|
type: string
|
||||||
|
kind:
|
||||||
|
description: Kind is the kind of the resource.
|
||||||
|
type: string
|
||||||
|
name:
|
||||||
|
description: Name is the name of the resource
|
||||||
|
type: string
|
||||||
|
namespace:
|
||||||
|
description: Namespace is the namespace of the resource,
|
||||||
|
the resource is cluster scoped if the value is empty
|
||||||
|
type: string
|
||||||
|
ordinal:
|
||||||
|
description: Ordinal represents an index in manifests list,
|
||||||
|
so the condition can still be linked to a manifest even
|
||||||
|
though manifest cannot be parsed successfully.
|
||||||
|
type: integer
|
||||||
|
resource:
|
||||||
|
description: Resource is the resource type of the resource
|
||||||
|
type: string
|
||||||
|
version:
|
||||||
|
description: Version is the version of the resource.
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- kind
|
||||||
|
- name
|
||||||
|
- ordinal
|
||||||
|
- resource
|
||||||
|
- version
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- identifier
|
||||||
|
type: object
|
||||||
|
x-kubernetes-preserve-unknown-fields: true
|
||||||
|
type: array
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- spec
|
||||||
|
type: object
|
||||||
|
served: true
|
||||||
|
storage: true
|
||||||
|
subresources:
|
||||||
|
status: {}
|
||||||
|
status:
|
||||||
|
acceptedNames:
|
||||||
|
kind: ""
|
||||||
|
plural: ""
|
||||||
|
conditions: []
|
||||||
|
storedVersions: []
|
|
@ -222,41 +222,6 @@ func (in *FieldSelector) DeepCopy() *FieldSelector {
|
||||||
return out
|
return out
|
||||||
}
|
}
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *Manifest) DeepCopyInto(out *Manifest) {
|
|
||||||
*out = *in
|
|
||||||
in.RawExtension.DeepCopyInto(&out.RawExtension)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Manifest.
|
|
||||||
func (in *Manifest) DeepCopy() *Manifest {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(Manifest)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *ManifestStatus) DeepCopyInto(out *ManifestStatus) {
|
|
||||||
*out = *in
|
|
||||||
out.Identifier = in.Identifier
|
|
||||||
in.Status.DeepCopyInto(&out.Status)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManifestStatus.
|
|
||||||
func (in *ManifestStatus) DeepCopy() *ManifestStatus {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(ManifestStatus)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||||
func (in *ObjectReference) DeepCopyInto(out *ObjectReference) {
|
func (in *ObjectReference) DeepCopyInto(out *ObjectReference) {
|
||||||
*out = *in
|
*out = *in
|
||||||
|
@ -633,22 +598,6 @@ func (in *ResourceBindingStatus) DeepCopy() *ResourceBindingStatus {
|
||||||
return out
|
return out
|
||||||
}
|
}
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *ResourceIdentifier) DeepCopyInto(out *ResourceIdentifier) {
|
|
||||||
*out = *in
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceIdentifier.
|
|
||||||
func (in *ResourceIdentifier) DeepCopy() *ResourceIdentifier {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(ResourceIdentifier)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||||
func (in *ResourceSelector) DeepCopyInto(out *ResourceSelector) {
|
func (in *ResourceSelector) DeepCopyInto(out *ResourceSelector) {
|
||||||
*out = *in
|
*out = *in
|
||||||
|
@ -722,134 +671,3 @@ func (in *TargetCluster) DeepCopy() *TargetCluster {
|
||||||
in.DeepCopyInto(out)
|
in.DeepCopyInto(out)
|
||||||
return out
|
return out
|
||||||
}
|
}
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *Work) DeepCopyInto(out *Work) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
|
||||||
in.Spec.DeepCopyInto(&out.Spec)
|
|
||||||
in.Status.DeepCopyInto(&out.Status)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Work.
|
|
||||||
func (in *Work) DeepCopy() *Work {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(Work)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *Work) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *WorkList) DeepCopyInto(out *WorkList) {
|
|
||||||
*out = *in
|
|
||||||
out.TypeMeta = in.TypeMeta
|
|
||||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
|
||||||
if in.Items != nil {
|
|
||||||
in, out := &in.Items, &out.Items
|
|
||||||
*out = make([]Work, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkList.
|
|
||||||
func (in *WorkList) DeepCopy() *WorkList {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(WorkList)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
||||||
func (in *WorkList) DeepCopyObject() runtime.Object {
|
|
||||||
if c := in.DeepCopy(); c != nil {
|
|
||||||
return c
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *WorkSpec) DeepCopyInto(out *WorkSpec) {
|
|
||||||
*out = *in
|
|
||||||
in.Workload.DeepCopyInto(&out.Workload)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkSpec.
|
|
||||||
func (in *WorkSpec) DeepCopy() *WorkSpec {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(WorkSpec)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *WorkStatus) DeepCopyInto(out *WorkStatus) {
|
|
||||||
*out = *in
|
|
||||||
if in.Conditions != nil {
|
|
||||||
in, out := &in.Conditions, &out.Conditions
|
|
||||||
*out = make([]v1.Condition, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if in.ManifestStatuses != nil {
|
|
||||||
in, out := &in.ManifestStatuses, &out.ManifestStatuses
|
|
||||||
*out = make([]ManifestStatus, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkStatus.
|
|
||||||
func (in *WorkStatus) DeepCopy() *WorkStatus {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(WorkStatus)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *WorkloadTemplate) DeepCopyInto(out *WorkloadTemplate) {
|
|
||||||
*out = *in
|
|
||||||
if in.Manifests != nil {
|
|
||||||
in, out := &in.Manifests, &out.Manifests
|
|
||||||
*out = make([]Manifest, len(*in))
|
|
||||||
for i := range *in {
|
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadTemplate.
|
|
||||||
func (in *WorkloadTemplate) DeepCopy() *WorkloadTemplate {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(WorkloadTemplate)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
|
@ -52,8 +52,6 @@ func addKnownTypes(scheme *runtime.Scheme) error {
|
||||||
&PropagationPolicyList{},
|
&PropagationPolicyList{},
|
||||||
&ResourceBinding{},
|
&ResourceBinding{},
|
||||||
&ResourceBindingList{},
|
&ResourceBindingList{},
|
||||||
&Work{},
|
|
||||||
&WorkList{},
|
|
||||||
)
|
)
|
||||||
// AddToGroupVersion allows the serialization of client types like ListOptions.
|
// AddToGroupVersion allows the serialization of client types like ListOptions.
|
||||||
v1.AddToGroupVersion(scheme, SchemeGroupVersion)
|
v1.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||||
|
|
|
@ -0,0 +1,192 @@
|
||||||
|
// +build !ignore_autogenerated
|
||||||
|
|
||||||
|
// Code generated by deepcopy-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
package v1alpha1
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
)
|
||||||
|
|
||||||
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||||
|
func (in *Manifest) DeepCopyInto(out *Manifest) {
|
||||||
|
*out = *in
|
||||||
|
in.RawExtension.DeepCopyInto(&out.RawExtension)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Manifest.
|
||||||
|
func (in *Manifest) DeepCopy() *Manifest {
|
||||||
|
if in == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
out := new(Manifest)
|
||||||
|
in.DeepCopyInto(out)
|
||||||
|
return out
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||||
|
func (in *ManifestStatus) DeepCopyInto(out *ManifestStatus) {
|
||||||
|
*out = *in
|
||||||
|
out.Identifier = in.Identifier
|
||||||
|
in.Status.DeepCopyInto(&out.Status)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManifestStatus.
|
||||||
|
func (in *ManifestStatus) DeepCopy() *ManifestStatus {
|
||||||
|
if in == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
out := new(ManifestStatus)
|
||||||
|
in.DeepCopyInto(out)
|
||||||
|
return out
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||||
|
func (in *ResourceIdentifier) DeepCopyInto(out *ResourceIdentifier) {
|
||||||
|
*out = *in
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceIdentifier.
|
||||||
|
func (in *ResourceIdentifier) DeepCopy() *ResourceIdentifier {
|
||||||
|
if in == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
out := new(ResourceIdentifier)
|
||||||
|
in.DeepCopyInto(out)
|
||||||
|
return out
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||||
|
func (in *Work) DeepCopyInto(out *Work) {
|
||||||
|
*out = *in
|
||||||
|
out.TypeMeta = in.TypeMeta
|
||||||
|
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||||
|
in.Spec.DeepCopyInto(&out.Spec)
|
||||||
|
in.Status.DeepCopyInto(&out.Status)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Work.
|
||||||
|
func (in *Work) DeepCopy() *Work {
|
||||||
|
if in == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
out := new(Work)
|
||||||
|
in.DeepCopyInto(out)
|
||||||
|
return out
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||||
|
func (in *Work) DeepCopyObject() runtime.Object {
|
||||||
|
if c := in.DeepCopy(); c != nil {
|
||||||
|
return c
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||||
|
func (in *WorkList) DeepCopyInto(out *WorkList) {
|
||||||
|
*out = *in
|
||||||
|
out.TypeMeta = in.TypeMeta
|
||||||
|
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
||||||
|
if in.Items != nil {
|
||||||
|
in, out := &in.Items, &out.Items
|
||||||
|
*out = make([]Work, len(*in))
|
||||||
|
for i := range *in {
|
||||||
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkList.
|
||||||
|
func (in *WorkList) DeepCopy() *WorkList {
|
||||||
|
if in == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
out := new(WorkList)
|
||||||
|
in.DeepCopyInto(out)
|
||||||
|
return out
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||||
|
func (in *WorkList) DeepCopyObject() runtime.Object {
|
||||||
|
if c := in.DeepCopy(); c != nil {
|
||||||
|
return c
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||||
|
func (in *WorkSpec) DeepCopyInto(out *WorkSpec) {
|
||||||
|
*out = *in
|
||||||
|
in.Workload.DeepCopyInto(&out.Workload)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkSpec.
|
||||||
|
func (in *WorkSpec) DeepCopy() *WorkSpec {
|
||||||
|
if in == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
out := new(WorkSpec)
|
||||||
|
in.DeepCopyInto(out)
|
||||||
|
return out
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||||
|
func (in *WorkStatus) DeepCopyInto(out *WorkStatus) {
|
||||||
|
*out = *in
|
||||||
|
if in.Conditions != nil {
|
||||||
|
in, out := &in.Conditions, &out.Conditions
|
||||||
|
*out = make([]v1.Condition, len(*in))
|
||||||
|
for i := range *in {
|
||||||
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if in.ManifestStatuses != nil {
|
||||||
|
in, out := &in.ManifestStatuses, &out.ManifestStatuses
|
||||||
|
*out = make([]ManifestStatus, len(*in))
|
||||||
|
for i := range *in {
|
||||||
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkStatus.
|
||||||
|
func (in *WorkStatus) DeepCopy() *WorkStatus {
|
||||||
|
if in == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
out := new(WorkStatus)
|
||||||
|
in.DeepCopyInto(out)
|
||||||
|
return out
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||||
|
func (in *WorkloadTemplate) DeepCopyInto(out *WorkloadTemplate) {
|
||||||
|
*out = *in
|
||||||
|
if in.Manifests != nil {
|
||||||
|
in, out := &in.Manifests, &out.Manifests
|
||||||
|
*out = make([]Manifest, len(*in))
|
||||||
|
for i := range *in {
|
||||||
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadTemplate.
|
||||||
|
func (in *WorkloadTemplate) DeepCopy() *WorkloadTemplate {
|
||||||
|
if in == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
out := new(WorkloadTemplate)
|
||||||
|
in.DeepCopyInto(out)
|
||||||
|
return out
|
||||||
|
}
|
|
@ -0,0 +1,51 @@
|
||||||
|
// Code generated by register-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
package v1alpha1
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
"k8s.io/apimachinery/pkg/runtime"
|
||||||
|
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
|
)
|
||||||
|
|
||||||
|
// GroupName specifies the group name used to register the objects.
|
||||||
|
const GroupName = "work.karmada.io"
|
||||||
|
|
||||||
|
// GroupVersion specifies the group and the version used to register the objects.
|
||||||
|
var GroupVersion = v1.GroupVersion{Group: GroupName, Version: "v1alpha1"}
|
||||||
|
|
||||||
|
// SchemeGroupVersion is group version used to register these objects
|
||||||
|
// Deprecated: use GroupVersion instead.
|
||||||
|
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}
|
||||||
|
|
||||||
|
// Resource takes an unqualified resource and returns a Group qualified GroupResource
|
||||||
|
func Resource(resource string) schema.GroupResource {
|
||||||
|
return SchemeGroupVersion.WithResource(resource).GroupResource()
|
||||||
|
}
|
||||||
|
|
||||||
|
var (
|
||||||
|
// localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
|
||||||
|
SchemeBuilder runtime.SchemeBuilder
|
||||||
|
localSchemeBuilder = &SchemeBuilder
|
||||||
|
// Depreciated: use Install instead
|
||||||
|
AddToScheme = localSchemeBuilder.AddToScheme
|
||||||
|
Install = localSchemeBuilder.AddToScheme
|
||||||
|
)
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
// We only register manually written functions here. The registration of the
|
||||||
|
// generated functions takes place in the generated files. The separation
|
||||||
|
// makes the code compile even when the generated files are missing.
|
||||||
|
localSchemeBuilder.Register(addKnownTypes)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Adds the list of known types to Scheme.
|
||||||
|
func addKnownTypes(scheme *runtime.Scheme) error {
|
||||||
|
scheme.AddKnownTypes(SchemeGroupVersion,
|
||||||
|
&Work{},
|
||||||
|
&WorkList{},
|
||||||
|
)
|
||||||
|
// AddToGroupVersion allows the serialization of client types like ListOptions.
|
||||||
|
v1.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -7,6 +7,7 @@ import (
|
||||||
|
|
||||||
clusterv1alpha1 "github.com/karmada-io/karmada/pkg/generated/clientset/versioned/typed/cluster/v1alpha1"
|
clusterv1alpha1 "github.com/karmada-io/karmada/pkg/generated/clientset/versioned/typed/cluster/v1alpha1"
|
||||||
policyv1alpha1 "github.com/karmada-io/karmada/pkg/generated/clientset/versioned/typed/policy/v1alpha1"
|
policyv1alpha1 "github.com/karmada-io/karmada/pkg/generated/clientset/versioned/typed/policy/v1alpha1"
|
||||||
|
workv1alpha1 "github.com/karmada-io/karmada/pkg/generated/clientset/versioned/typed/work/v1alpha1"
|
||||||
discovery "k8s.io/client-go/discovery"
|
discovery "k8s.io/client-go/discovery"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
flowcontrol "k8s.io/client-go/util/flowcontrol"
|
flowcontrol "k8s.io/client-go/util/flowcontrol"
|
||||||
|
@ -16,6 +17,7 @@ type Interface interface {
|
||||||
Discovery() discovery.DiscoveryInterface
|
Discovery() discovery.DiscoveryInterface
|
||||||
ClusterV1alpha1() clusterv1alpha1.ClusterV1alpha1Interface
|
ClusterV1alpha1() clusterv1alpha1.ClusterV1alpha1Interface
|
||||||
PolicyV1alpha1() policyv1alpha1.PolicyV1alpha1Interface
|
PolicyV1alpha1() policyv1alpha1.PolicyV1alpha1Interface
|
||||||
|
WorkV1alpha1() workv1alpha1.WorkV1alpha1Interface
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clientset contains the clients for groups. Each group has exactly one
|
// Clientset contains the clients for groups. Each group has exactly one
|
||||||
|
@ -24,6 +26,7 @@ type Clientset struct {
|
||||||
*discovery.DiscoveryClient
|
*discovery.DiscoveryClient
|
||||||
clusterV1alpha1 *clusterv1alpha1.ClusterV1alpha1Client
|
clusterV1alpha1 *clusterv1alpha1.ClusterV1alpha1Client
|
||||||
policyV1alpha1 *policyv1alpha1.PolicyV1alpha1Client
|
policyV1alpha1 *policyv1alpha1.PolicyV1alpha1Client
|
||||||
|
workV1alpha1 *workv1alpha1.WorkV1alpha1Client
|
||||||
}
|
}
|
||||||
|
|
||||||
// ClusterV1alpha1 retrieves the ClusterV1alpha1Client
|
// ClusterV1alpha1 retrieves the ClusterV1alpha1Client
|
||||||
|
@ -36,6 +39,11 @@ func (c *Clientset) PolicyV1alpha1() policyv1alpha1.PolicyV1alpha1Interface {
|
||||||
return c.policyV1alpha1
|
return c.policyV1alpha1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// WorkV1alpha1 retrieves the WorkV1alpha1Client
|
||||||
|
func (c *Clientset) WorkV1alpha1() workv1alpha1.WorkV1alpha1Interface {
|
||||||
|
return c.workV1alpha1
|
||||||
|
}
|
||||||
|
|
||||||
// Discovery retrieves the DiscoveryClient
|
// Discovery retrieves the DiscoveryClient
|
||||||
func (c *Clientset) Discovery() discovery.DiscoveryInterface {
|
func (c *Clientset) Discovery() discovery.DiscoveryInterface {
|
||||||
if c == nil {
|
if c == nil {
|
||||||
|
@ -65,6 +73,10 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
cs.workV1alpha1, err = workv1alpha1.NewForConfig(&configShallowCopy)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy)
|
cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -79,6 +91,7 @@ func NewForConfigOrDie(c *rest.Config) *Clientset {
|
||||||
var cs Clientset
|
var cs Clientset
|
||||||
cs.clusterV1alpha1 = clusterv1alpha1.NewForConfigOrDie(c)
|
cs.clusterV1alpha1 = clusterv1alpha1.NewForConfigOrDie(c)
|
||||||
cs.policyV1alpha1 = policyv1alpha1.NewForConfigOrDie(c)
|
cs.policyV1alpha1 = policyv1alpha1.NewForConfigOrDie(c)
|
||||||
|
cs.workV1alpha1 = workv1alpha1.NewForConfigOrDie(c)
|
||||||
|
|
||||||
cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c)
|
cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c)
|
||||||
return &cs
|
return &cs
|
||||||
|
@ -89,6 +102,7 @@ func New(c rest.Interface) *Clientset {
|
||||||
var cs Clientset
|
var cs Clientset
|
||||||
cs.clusterV1alpha1 = clusterv1alpha1.New(c)
|
cs.clusterV1alpha1 = clusterv1alpha1.New(c)
|
||||||
cs.policyV1alpha1 = policyv1alpha1.New(c)
|
cs.policyV1alpha1 = policyv1alpha1.New(c)
|
||||||
|
cs.workV1alpha1 = workv1alpha1.New(c)
|
||||||
|
|
||||||
cs.DiscoveryClient = discovery.NewDiscoveryClient(c)
|
cs.DiscoveryClient = discovery.NewDiscoveryClient(c)
|
||||||
return &cs
|
return &cs
|
||||||
|
|
|
@ -8,6 +8,8 @@ import (
|
||||||
fakeclusterv1alpha1 "github.com/karmada-io/karmada/pkg/generated/clientset/versioned/typed/cluster/v1alpha1/fake"
|
fakeclusterv1alpha1 "github.com/karmada-io/karmada/pkg/generated/clientset/versioned/typed/cluster/v1alpha1/fake"
|
||||||
policyv1alpha1 "github.com/karmada-io/karmada/pkg/generated/clientset/versioned/typed/policy/v1alpha1"
|
policyv1alpha1 "github.com/karmada-io/karmada/pkg/generated/clientset/versioned/typed/policy/v1alpha1"
|
||||||
fakepolicyv1alpha1 "github.com/karmada-io/karmada/pkg/generated/clientset/versioned/typed/policy/v1alpha1/fake"
|
fakepolicyv1alpha1 "github.com/karmada-io/karmada/pkg/generated/clientset/versioned/typed/policy/v1alpha1/fake"
|
||||||
|
workv1alpha1 "github.com/karmada-io/karmada/pkg/generated/clientset/versioned/typed/work/v1alpha1"
|
||||||
|
fakeworkv1alpha1 "github.com/karmada-io/karmada/pkg/generated/clientset/versioned/typed/work/v1alpha1/fake"
|
||||||
"k8s.io/apimachinery/pkg/runtime"
|
"k8s.io/apimachinery/pkg/runtime"
|
||||||
"k8s.io/apimachinery/pkg/watch"
|
"k8s.io/apimachinery/pkg/watch"
|
||||||
"k8s.io/client-go/discovery"
|
"k8s.io/client-go/discovery"
|
||||||
|
@ -71,3 +73,8 @@ func (c *Clientset) ClusterV1alpha1() clusterv1alpha1.ClusterV1alpha1Interface {
|
||||||
func (c *Clientset) PolicyV1alpha1() policyv1alpha1.PolicyV1alpha1Interface {
|
func (c *Clientset) PolicyV1alpha1() policyv1alpha1.PolicyV1alpha1Interface {
|
||||||
return &fakepolicyv1alpha1.FakePolicyV1alpha1{Fake: &c.Fake}
|
return &fakepolicyv1alpha1.FakePolicyV1alpha1{Fake: &c.Fake}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// WorkV1alpha1 retrieves the WorkV1alpha1Client
|
||||||
|
func (c *Clientset) WorkV1alpha1() workv1alpha1.WorkV1alpha1Interface {
|
||||||
|
return &fakeworkv1alpha1.FakeWorkV1alpha1{Fake: &c.Fake}
|
||||||
|
}
|
||||||
|
|
|
@ -5,6 +5,7 @@ package fake
|
||||||
import (
|
import (
|
||||||
clusterv1alpha1 "github.com/karmada-io/karmada/pkg/apis/cluster/v1alpha1"
|
clusterv1alpha1 "github.com/karmada-io/karmada/pkg/apis/cluster/v1alpha1"
|
||||||
policyv1alpha1 "github.com/karmada-io/karmada/pkg/apis/policy/v1alpha1"
|
policyv1alpha1 "github.com/karmada-io/karmada/pkg/apis/policy/v1alpha1"
|
||||||
|
workv1alpha1 "github.com/karmada-io/karmada/pkg/apis/work/v1alpha1"
|
||||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
|
@ -18,6 +19,7 @@ var codecs = serializer.NewCodecFactory(scheme)
|
||||||
var localSchemeBuilder = runtime.SchemeBuilder{
|
var localSchemeBuilder = runtime.SchemeBuilder{
|
||||||
clusterv1alpha1.AddToScheme,
|
clusterv1alpha1.AddToScheme,
|
||||||
policyv1alpha1.AddToScheme,
|
policyv1alpha1.AddToScheme,
|
||||||
|
workv1alpha1.AddToScheme,
|
||||||
}
|
}
|
||||||
|
|
||||||
// AddToScheme adds all types of this clientset into the given scheme. This allows composition
|
// AddToScheme adds all types of this clientset into the given scheme. This allows composition
|
||||||
|
|
|
@ -5,6 +5,7 @@ package scheme
|
||||||
import (
|
import (
|
||||||
clusterv1alpha1 "github.com/karmada-io/karmada/pkg/apis/cluster/v1alpha1"
|
clusterv1alpha1 "github.com/karmada-io/karmada/pkg/apis/cluster/v1alpha1"
|
||||||
policyv1alpha1 "github.com/karmada-io/karmada/pkg/apis/policy/v1alpha1"
|
policyv1alpha1 "github.com/karmada-io/karmada/pkg/apis/policy/v1alpha1"
|
||||||
|
workv1alpha1 "github.com/karmada-io/karmada/pkg/apis/work/v1alpha1"
|
||||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
|
@ -18,6 +19,7 @@ var ParameterCodec = runtime.NewParameterCodec(Scheme)
|
||||||
var localSchemeBuilder = runtime.SchemeBuilder{
|
var localSchemeBuilder = runtime.SchemeBuilder{
|
||||||
clusterv1alpha1.AddToScheme,
|
clusterv1alpha1.AddToScheme,
|
||||||
policyv1alpha1.AddToScheme,
|
policyv1alpha1.AddToScheme,
|
||||||
|
workv1alpha1.AddToScheme,
|
||||||
}
|
}
|
||||||
|
|
||||||
// AddToScheme adds all types of this clientset into the given scheme. This allows composition
|
// AddToScheme adds all types of this clientset into the given scheme. This allows composition
|
||||||
|
|
|
@ -32,10 +32,6 @@ func (c *FakePolicyV1alpha1) ResourceBindings(namespace string) v1alpha1.Resourc
|
||||||
return &FakeResourceBindings{c, namespace}
|
return &FakeResourceBindings{c, namespace}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *FakePolicyV1alpha1) Works(namespace string) v1alpha1.WorkInterface {
|
|
||||||
return &FakeWorks{c, namespace}
|
|
||||||
}
|
|
||||||
|
|
||||||
// RESTClient returns a RESTClient that is used to communicate
|
// RESTClient returns a RESTClient that is used to communicate
|
||||||
// with API server by this client implementation.
|
// with API server by this client implementation.
|
||||||
func (c *FakePolicyV1alpha1) RESTClient() rest.Interface {
|
func (c *FakePolicyV1alpha1) RESTClient() rest.Interface {
|
||||||
|
|
|
@ -11,5 +11,3 @@ type OverridePolicyExpansion interface{}
|
||||||
type PropagationPolicyExpansion interface{}
|
type PropagationPolicyExpansion interface{}
|
||||||
|
|
||||||
type ResourceBindingExpansion interface{}
|
type ResourceBindingExpansion interface{}
|
||||||
|
|
||||||
type WorkExpansion interface{}
|
|
||||||
|
|
|
@ -15,7 +15,6 @@ type PolicyV1alpha1Interface interface {
|
||||||
OverridePoliciesGetter
|
OverridePoliciesGetter
|
||||||
PropagationPoliciesGetter
|
PropagationPoliciesGetter
|
||||||
ResourceBindingsGetter
|
ResourceBindingsGetter
|
||||||
WorksGetter
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// PolicyV1alpha1Client is used to interact with features provided by the policy.karmada.io group.
|
// PolicyV1alpha1Client is used to interact with features provided by the policy.karmada.io group.
|
||||||
|
@ -43,10 +42,6 @@ func (c *PolicyV1alpha1Client) ResourceBindings(namespace string) ResourceBindin
|
||||||
return newResourceBindings(c, namespace)
|
return newResourceBindings(c, namespace)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *PolicyV1alpha1Client) Works(namespace string) WorkInterface {
|
|
||||||
return newWorks(c, namespace)
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewForConfig creates a new PolicyV1alpha1Client for the given config.
|
// NewForConfig creates a new PolicyV1alpha1Client for the given config.
|
||||||
func NewForConfig(c *rest.Config) (*PolicyV1alpha1Client, error) {
|
func NewForConfig(c *rest.Config) (*PolicyV1alpha1Client, error) {
|
||||||
config := *c
|
config := *c
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
// This package has the automatically generated typed clients.
|
||||||
|
package v1alpha1
|
|
@ -0,0 +1,4 @@
|
||||||
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
// Package fake has the automatically generated clients.
|
||||||
|
package fake
|
|
@ -5,7 +5,7 @@ package fake
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
v1alpha1 "github.com/karmada-io/karmada/pkg/apis/policy/v1alpha1"
|
v1alpha1 "github.com/karmada-io/karmada/pkg/apis/work/v1alpha1"
|
||||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
labels "k8s.io/apimachinery/pkg/labels"
|
labels "k8s.io/apimachinery/pkg/labels"
|
||||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
|
@ -16,13 +16,13 @@ import (
|
||||||
|
|
||||||
// FakeWorks implements WorkInterface
|
// FakeWorks implements WorkInterface
|
||||||
type FakeWorks struct {
|
type FakeWorks struct {
|
||||||
Fake *FakePolicyV1alpha1
|
Fake *FakeWorkV1alpha1
|
||||||
ns string
|
ns string
|
||||||
}
|
}
|
||||||
|
|
||||||
var worksResource = schema.GroupVersionResource{Group: "policy.karmada.io", Version: "v1alpha1", Resource: "works"}
|
var worksResource = schema.GroupVersionResource{Group: "work.karmada.io", Version: "v1alpha1", Resource: "works"}
|
||||||
|
|
||||||
var worksKind = schema.GroupVersionKind{Group: "policy.karmada.io", Version: "v1alpha1", Kind: "Work"}
|
var worksKind = schema.GroupVersionKind{Group: "work.karmada.io", Version: "v1alpha1", Kind: "Work"}
|
||||||
|
|
||||||
// Get takes name of the work, and returns the corresponding work object, and an error if there is any.
|
// Get takes name of the work, and returns the corresponding work object, and an error if there is any.
|
||||||
func (c *FakeWorks) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.Work, err error) {
|
func (c *FakeWorks) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.Work, err error) {
|
|
@ -0,0 +1,24 @@
|
||||||
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
package fake
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1alpha1 "github.com/karmada-io/karmada/pkg/generated/clientset/versioned/typed/work/v1alpha1"
|
||||||
|
rest "k8s.io/client-go/rest"
|
||||||
|
testing "k8s.io/client-go/testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
type FakeWorkV1alpha1 struct {
|
||||||
|
*testing.Fake
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakeWorkV1alpha1) Works(namespace string) v1alpha1.WorkInterface {
|
||||||
|
return &FakeWorks{c, namespace}
|
||||||
|
}
|
||||||
|
|
||||||
|
// RESTClient returns a RESTClient that is used to communicate
|
||||||
|
// with API server by this client implementation.
|
||||||
|
func (c *FakeWorkV1alpha1) RESTClient() rest.Interface {
|
||||||
|
var ret *rest.RESTClient
|
||||||
|
return ret
|
||||||
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
package v1alpha1
|
||||||
|
|
||||||
|
type WorkExpansion interface{}
|
|
@ -6,7 +6,7 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
v1alpha1 "github.com/karmada-io/karmada/pkg/apis/policy/v1alpha1"
|
v1alpha1 "github.com/karmada-io/karmada/pkg/apis/work/v1alpha1"
|
||||||
scheme "github.com/karmada-io/karmada/pkg/generated/clientset/versioned/scheme"
|
scheme "github.com/karmada-io/karmada/pkg/generated/clientset/versioned/scheme"
|
||||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
|
@ -41,7 +41,7 @@ type works struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
// newWorks returns a Works
|
// newWorks returns a Works
|
||||||
func newWorks(c *PolicyV1alpha1Client, namespace string) *works {
|
func newWorks(c *WorkV1alpha1Client, namespace string) *works {
|
||||||
return &works{
|
return &works{
|
||||||
client: c.RESTClient(),
|
client: c.RESTClient(),
|
||||||
ns: namespace,
|
ns: namespace,
|
|
@ -0,0 +1,73 @@
|
||||||
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
package v1alpha1
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1alpha1 "github.com/karmada-io/karmada/pkg/apis/work/v1alpha1"
|
||||||
|
"github.com/karmada-io/karmada/pkg/generated/clientset/versioned/scheme"
|
||||||
|
rest "k8s.io/client-go/rest"
|
||||||
|
)
|
||||||
|
|
||||||
|
type WorkV1alpha1Interface interface {
|
||||||
|
RESTClient() rest.Interface
|
||||||
|
WorksGetter
|
||||||
|
}
|
||||||
|
|
||||||
|
// WorkV1alpha1Client is used to interact with features provided by the work.karmada.io group.
|
||||||
|
type WorkV1alpha1Client struct {
|
||||||
|
restClient rest.Interface
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *WorkV1alpha1Client) Works(namespace string) WorkInterface {
|
||||||
|
return newWorks(c, namespace)
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewForConfig creates a new WorkV1alpha1Client for the given config.
|
||||||
|
func NewForConfig(c *rest.Config) (*WorkV1alpha1Client, error) {
|
||||||
|
config := *c
|
||||||
|
if err := setConfigDefaults(&config); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
client, err := rest.RESTClientFor(&config)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return &WorkV1alpha1Client{client}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewForConfigOrDie creates a new WorkV1alpha1Client for the given config and
|
||||||
|
// panics if there is an error in the config.
|
||||||
|
func NewForConfigOrDie(c *rest.Config) *WorkV1alpha1Client {
|
||||||
|
client, err := NewForConfig(c)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
return client
|
||||||
|
}
|
||||||
|
|
||||||
|
// New creates a new WorkV1alpha1Client for the given RESTClient.
|
||||||
|
func New(c rest.Interface) *WorkV1alpha1Client {
|
||||||
|
return &WorkV1alpha1Client{c}
|
||||||
|
}
|
||||||
|
|
||||||
|
func setConfigDefaults(config *rest.Config) error {
|
||||||
|
gv := v1alpha1.SchemeGroupVersion
|
||||||
|
config.GroupVersion = &gv
|
||||||
|
config.APIPath = "/apis"
|
||||||
|
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
|
||||||
|
|
||||||
|
if config.UserAgent == "" {
|
||||||
|
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// RESTClient returns a RESTClient that is used to communicate
|
||||||
|
// with API server by this client implementation.
|
||||||
|
func (c *WorkV1alpha1Client) RESTClient() rest.Interface {
|
||||||
|
if c == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return c.restClient
|
||||||
|
}
|
|
@ -11,6 +11,7 @@ import (
|
||||||
cluster "github.com/karmada-io/karmada/pkg/generated/informers/externalversions/cluster"
|
cluster "github.com/karmada-io/karmada/pkg/generated/informers/externalversions/cluster"
|
||||||
internalinterfaces "github.com/karmada-io/karmada/pkg/generated/informers/externalversions/internalinterfaces"
|
internalinterfaces "github.com/karmada-io/karmada/pkg/generated/informers/externalversions/internalinterfaces"
|
||||||
policy "github.com/karmada-io/karmada/pkg/generated/informers/externalversions/policy"
|
policy "github.com/karmada-io/karmada/pkg/generated/informers/externalversions/policy"
|
||||||
|
work "github.com/karmada-io/karmada/pkg/generated/informers/externalversions/work"
|
||||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
|
@ -159,6 +160,7 @@ type SharedInformerFactory interface {
|
||||||
|
|
||||||
Cluster() cluster.Interface
|
Cluster() cluster.Interface
|
||||||
Policy() policy.Interface
|
Policy() policy.Interface
|
||||||
|
Work() work.Interface
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *sharedInformerFactory) Cluster() cluster.Interface {
|
func (f *sharedInformerFactory) Cluster() cluster.Interface {
|
||||||
|
@ -168,3 +170,7 @@ func (f *sharedInformerFactory) Cluster() cluster.Interface {
|
||||||
func (f *sharedInformerFactory) Policy() policy.Interface {
|
func (f *sharedInformerFactory) Policy() policy.Interface {
|
||||||
return policy.New(f, f.namespace, f.tweakListOptions)
|
return policy.New(f, f.namespace, f.tweakListOptions)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (f *sharedInformerFactory) Work() work.Interface {
|
||||||
|
return work.New(f, f.namespace, f.tweakListOptions)
|
||||||
|
}
|
||||||
|
|
|
@ -7,6 +7,7 @@ import (
|
||||||
|
|
||||||
v1alpha1 "github.com/karmada-io/karmada/pkg/apis/cluster/v1alpha1"
|
v1alpha1 "github.com/karmada-io/karmada/pkg/apis/cluster/v1alpha1"
|
||||||
policyv1alpha1 "github.com/karmada-io/karmada/pkg/apis/policy/v1alpha1"
|
policyv1alpha1 "github.com/karmada-io/karmada/pkg/apis/policy/v1alpha1"
|
||||||
|
workv1alpha1 "github.com/karmada-io/karmada/pkg/apis/work/v1alpha1"
|
||||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
cache "k8s.io/client-go/tools/cache"
|
cache "k8s.io/client-go/tools/cache"
|
||||||
)
|
)
|
||||||
|
@ -52,8 +53,10 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
|
||||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Policy().V1alpha1().PropagationPolicies().Informer()}, nil
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Policy().V1alpha1().PropagationPolicies().Informer()}, nil
|
||||||
case policyv1alpha1.SchemeGroupVersion.WithResource("resourcebindings"):
|
case policyv1alpha1.SchemeGroupVersion.WithResource("resourcebindings"):
|
||||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Policy().V1alpha1().ResourceBindings().Informer()}, nil
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Policy().V1alpha1().ResourceBindings().Informer()}, nil
|
||||||
case policyv1alpha1.SchemeGroupVersion.WithResource("works"):
|
|
||||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Policy().V1alpha1().Works().Informer()}, nil
|
// Group=work.karmada.io, Version=v1alpha1
|
||||||
|
case workv1alpha1.SchemeGroupVersion.WithResource("works"):
|
||||||
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Work().V1alpha1().Works().Informer()}, nil
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,8 +18,6 @@ type Interface interface {
|
||||||
PropagationPolicies() PropagationPolicyInformer
|
PropagationPolicies() PropagationPolicyInformer
|
||||||
// ResourceBindings returns a ResourceBindingInformer.
|
// ResourceBindings returns a ResourceBindingInformer.
|
||||||
ResourceBindings() ResourceBindingInformer
|
ResourceBindings() ResourceBindingInformer
|
||||||
// Works returns a WorkInformer.
|
|
||||||
Works() WorkInformer
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type version struct {
|
type version struct {
|
||||||
|
@ -57,8 +55,3 @@ func (v *version) PropagationPolicies() PropagationPolicyInformer {
|
||||||
func (v *version) ResourceBindings() ResourceBindingInformer {
|
func (v *version) ResourceBindings() ResourceBindingInformer {
|
||||||
return &resourceBindingInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
return &resourceBindingInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Works returns a WorkInformer.
|
|
||||||
func (v *version) Works() WorkInformer {
|
|
||||||
return &workInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
|
||||||
}
|
|
||||||
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
// Code generated by informer-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
package work
|
||||||
|
|
||||||
|
import (
|
||||||
|
internalinterfaces "github.com/karmada-io/karmada/pkg/generated/informers/externalversions/internalinterfaces"
|
||||||
|
v1alpha1 "github.com/karmada-io/karmada/pkg/generated/informers/externalversions/work/v1alpha1"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Interface provides access to each of this group's versions.
|
||||||
|
type Interface interface {
|
||||||
|
// V1alpha1 provides access to shared informers for resources in V1alpha1.
|
||||||
|
V1alpha1() v1alpha1.Interface
|
||||||
|
}
|
||||||
|
|
||||||
|
type group struct {
|
||||||
|
factory internalinterfaces.SharedInformerFactory
|
||||||
|
namespace string
|
||||||
|
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||||
|
}
|
||||||
|
|
||||||
|
// New returns a new Interface.
|
||||||
|
func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
|
||||||
|
return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
|
||||||
|
}
|
||||||
|
|
||||||
|
// V1alpha1 returns a new v1alpha1.Interface.
|
||||||
|
func (g *group) V1alpha1() v1alpha1.Interface {
|
||||||
|
return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions)
|
||||||
|
}
|
|
@ -0,0 +1,29 @@
|
||||||
|
// Code generated by informer-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
package v1alpha1
|
||||||
|
|
||||||
|
import (
|
||||||
|
internalinterfaces "github.com/karmada-io/karmada/pkg/generated/informers/externalversions/internalinterfaces"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Interface provides access to all the informers in this group version.
|
||||||
|
type Interface interface {
|
||||||
|
// Works returns a WorkInformer.
|
||||||
|
Works() WorkInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
type version struct {
|
||||||
|
factory internalinterfaces.SharedInformerFactory
|
||||||
|
namespace string
|
||||||
|
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||||
|
}
|
||||||
|
|
||||||
|
// New returns a new Interface.
|
||||||
|
func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
|
||||||
|
return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Works returns a WorkInformer.
|
||||||
|
func (v *version) Works() WorkInformer {
|
||||||
|
return &workInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||||
|
}
|
|
@ -6,10 +6,10 @@ import (
|
||||||
"context"
|
"context"
|
||||||
time "time"
|
time "time"
|
||||||
|
|
||||||
policyv1alpha1 "github.com/karmada-io/karmada/pkg/apis/policy/v1alpha1"
|
workv1alpha1 "github.com/karmada-io/karmada/pkg/apis/work/v1alpha1"
|
||||||
versioned "github.com/karmada-io/karmada/pkg/generated/clientset/versioned"
|
versioned "github.com/karmada-io/karmada/pkg/generated/clientset/versioned"
|
||||||
internalinterfaces "github.com/karmada-io/karmada/pkg/generated/informers/externalversions/internalinterfaces"
|
internalinterfaces "github.com/karmada-io/karmada/pkg/generated/informers/externalversions/internalinterfaces"
|
||||||
v1alpha1 "github.com/karmada-io/karmada/pkg/generated/listers/policy/v1alpha1"
|
v1alpha1 "github.com/karmada-io/karmada/pkg/generated/listers/work/v1alpha1"
|
||||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
@ -46,16 +46,16 @@ func NewFilteredWorkInformer(client versioned.Interface, namespace string, resyn
|
||||||
if tweakListOptions != nil {
|
if tweakListOptions != nil {
|
||||||
tweakListOptions(&options)
|
tweakListOptions(&options)
|
||||||
}
|
}
|
||||||
return client.PolicyV1alpha1().Works(namespace).List(context.TODO(), options)
|
return client.WorkV1alpha1().Works(namespace).List(context.TODO(), options)
|
||||||
},
|
},
|
||||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||||
if tweakListOptions != nil {
|
if tweakListOptions != nil {
|
||||||
tweakListOptions(&options)
|
tweakListOptions(&options)
|
||||||
}
|
}
|
||||||
return client.PolicyV1alpha1().Works(namespace).Watch(context.TODO(), options)
|
return client.WorkV1alpha1().Works(namespace).Watch(context.TODO(), options)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
&policyv1alpha1.Work{},
|
&workv1alpha1.Work{},
|
||||||
resyncPeriod,
|
resyncPeriod,
|
||||||
indexers,
|
indexers,
|
||||||
)
|
)
|
||||||
|
@ -66,7 +66,7 @@ func (f *workInformer) defaultInformer(client versioned.Interface, resyncPeriod
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *workInformer) Informer() cache.SharedIndexInformer {
|
func (f *workInformer) Informer() cache.SharedIndexInformer {
|
||||||
return f.factory.InformerFor(&policyv1alpha1.Work{}, f.defaultInformer)
|
return f.factory.InformerFor(&workv1alpha1.Work{}, f.defaultInformer)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *workInformer) Lister() v1alpha1.WorkLister {
|
func (f *workInformer) Lister() v1alpha1.WorkLister {
|
|
@ -33,11 +33,3 @@ type ResourceBindingListerExpansion interface{}
|
||||||
// ResourceBindingNamespaceListerExpansion allows custom methods to be added to
|
// ResourceBindingNamespaceListerExpansion allows custom methods to be added to
|
||||||
// ResourceBindingNamespaceLister.
|
// ResourceBindingNamespaceLister.
|
||||||
type ResourceBindingNamespaceListerExpansion interface{}
|
type ResourceBindingNamespaceListerExpansion interface{}
|
||||||
|
|
||||||
// WorkListerExpansion allows custom methods to be added to
|
|
||||||
// WorkLister.
|
|
||||||
type WorkListerExpansion interface{}
|
|
||||||
|
|
||||||
// WorkNamespaceListerExpansion allows custom methods to be added to
|
|
||||||
// WorkNamespaceLister.
|
|
||||||
type WorkNamespaceListerExpansion interface{}
|
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
// Code generated by lister-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
package v1alpha1
|
||||||
|
|
||||||
|
// WorkListerExpansion allows custom methods to be added to
|
||||||
|
// WorkLister.
|
||||||
|
type WorkListerExpansion interface{}
|
||||||
|
|
||||||
|
// WorkNamespaceListerExpansion allows custom methods to be added to
|
||||||
|
// WorkNamespaceLister.
|
||||||
|
type WorkNamespaceListerExpansion interface{}
|
|
@ -3,7 +3,7 @@
|
||||||
package v1alpha1
|
package v1alpha1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
v1alpha1 "github.com/karmada-io/karmada/pkg/apis/policy/v1alpha1"
|
v1alpha1 "github.com/karmada-io/karmada/pkg/apis/work/v1alpha1"
|
||||||
"k8s.io/apimachinery/pkg/api/errors"
|
"k8s.io/apimachinery/pkg/api/errors"
|
||||||
"k8s.io/apimachinery/pkg/labels"
|
"k8s.io/apimachinery/pkg/labels"
|
||||||
"k8s.io/client-go/tools/cache"
|
"k8s.io/client-go/tools/cache"
|
Loading…
Reference in New Issue