diff --git a/pkg/apis/common/v1/openapi_generated.go b/pkg/apis/common/v1/openapi_generated.go index 7b70961e..3f8ddd46 100644 --- a/pkg/apis/common/v1/openapi_generated.go +++ b/pkg/apis/common/v1/openapi_generated.go @@ -225,7 +225,13 @@ func schema_pkg_apis_common_v1_ReplicaStatus(ref common.ReferenceCallback) commo }, "labelSelector": { SchemaProps: spec.SchemaProps{ - Description: "A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.", + Description: "Deprecated: Use Selector instead", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + "selector": { + SchemaProps: spec.SchemaProps{ + Description: "A Selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty Selector matches all objects. A null Selector matches no objects.", Type: []string{"string"}, Format: "", }, @@ -233,6 +239,8 @@ func schema_pkg_apis_common_v1_ReplicaStatus(ref common.ReferenceCallback) commo }, }, }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, } } diff --git a/pkg/apis/common/v1/types.go b/pkg/apis/common/v1/types.go index 39729785..bb5e4148 100644 --- a/pkg/apis/common/v1/types.go +++ b/pkg/apis/common/v1/types.go @@ -63,10 +63,13 @@ type ReplicaStatus struct { // The number of pods which reached phase Failed. Failed int32 `json:"failed,omitempty"` - // A label selector is a label query over a set of resources. The result of matchLabels and - // matchExpressions are ANDed. An empty label selector matches all objects. A null - // label selector matches no objects. - LabelSelector string `json:"labelSelector,omitempty"` + // Deprecated: Use Selector instead + LabelSelector *metav1.LabelSelector `json:"labelSelector,omitempty"` + + // A Selector is a label query over a set of resources. The result of matchLabels and + // matchExpressions are ANDed. An empty Selector matches all objects. A null + // Selector matches no objects. + Selector string `json:"selector,omitempty"` } // +k8s:openapi-gen=true diff --git a/pkg/apis/common/v1/zz_generated.deepcopy.go b/pkg/apis/common/v1/zz_generated.deepcopy.go index e2d51f58..8e07fc2e 100644 --- a/pkg/apis/common/v1/zz_generated.deepcopy.go +++ b/pkg/apis/common/v1/zz_generated.deepcopy.go @@ -22,6 +22,7 @@ package v1 import ( corev1 "k8s.io/api/core/v1" resource "k8s.io/apimachinery/pkg/api/resource" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -62,7 +63,7 @@ func (in *JobStatus) DeepCopyInto(out *JobStatus) { } else { in, out := &val, &outVal *out = new(ReplicaStatus) - **out = **in + (*in).DeepCopyInto(*out) } (*out)[key] = outVal } @@ -117,6 +118,11 @@ func (in *ReplicaSpec) DeepCopy() *ReplicaSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ReplicaStatus) DeepCopyInto(out *ReplicaStatus) { *out = *in + if in.LabelSelector != nil { + in, out := &in.LabelSelector, &out.LabelSelector + *out = new(metav1.LabelSelector) + (*in).DeepCopyInto(*out) + } return }