Add more comments about filed selector in cluster affinity.

Signed-off-by: RainbowMango <qdurenhongcai@gmail.com>
This commit is contained in:
RainbowMango 2023-03-07 11:52:39 +08:00
parent eb569ff9b6
commit 75f27339ce
9 changed files with 88 additions and 40 deletions

View File

@ -15052,7 +15052,7 @@
}
},
"fieldSelector": {
"description": "FieldSelector is a filter to select member clusters by fields. If non-nil and non-empty, only the clusters match this filter will be selected.",
"description": "FieldSelector is a filter to select member clusters by fields. The key(field) of the match expression should be 'provider', 'region', or 'zone', and the operator of the match expression should be 'In' or 'NotIn'. If non-nil and non-empty, only the clusters match this filter will be selected.",
"$ref": "#/definitions/com.github.karmada-io.karmada.pkg.apis.policy.v1alpha1.FieldSelector"
},
"labelSelector": {
@ -15090,7 +15090,7 @@
}
},
"fieldSelector": {
"description": "FieldSelector is a filter to select member clusters by fields. If non-nil and non-empty, only the clusters match this filter will be selected.",
"description": "FieldSelector is a filter to select member clusters by fields. The key(field) of the match expression should be 'provider', 'region', or 'zone', and the operator of the match expression should be 'In' or 'NotIn'. If non-nil and non-empty, only the clusters match this filter will be selected.",
"$ref": "#/definitions/com.github.karmada-io.karmada.pkg.apis.policy.v1alpha1.FieldSelector"
},
"labelSelector": {

View File

@ -281,8 +281,11 @@ spec:
type: array
fieldSelector:
description: FieldSelector is a filter to select member
clusters by fields. If non-nil and non-empty, only the
clusters match this filter will be selected.
clusters by fields. The key(field) of the match expression
should be 'provider', 'region', or 'zone', and the operator
of the match expression should be 'In' or 'NotIn'. If
non-nil and non-empty, only the clusters match this filter
will be selected.
properties:
matchExpressions:
description: A list of field selector requirements.
@ -669,8 +672,10 @@ spec:
type: array
fieldSelector:
description: FieldSelector is a filter to select member clusters
by fields. If non-nil and non-empty, only the clusters match
this filter will be selected.
by fields. The key(field) of the match expression should be
'provider', 'region', or 'zone', and the operator of the match
expression should be 'In' or 'NotIn'. If non-nil and non-empty,
only the clusters match this filter will be selected.
properties:
matchExpressions:
description: A list of field selector requirements.

View File

@ -109,8 +109,11 @@ spec:
type: array
fieldSelector:
description: FieldSelector is a filter to select member
clusters by fields. If non-nil and non-empty, only the
clusters match this filter will be selected.
clusters by fields. The key(field) of the match expression
should be 'provider', 'region', or 'zone', and the operator
of the match expression should be 'In' or 'NotIn'. If
non-nil and non-empty, only the clusters match this filter
will be selected.
properties:
matchExpressions:
description: A list of field selector requirements.
@ -217,8 +220,11 @@ spec:
type: array
fieldSelector:
description: FieldSelector is a filter to select member clusters
by fields. If non-nil and non-empty, only the clusters match
this filter will be selected.
by fields. The key(field) of the match expression should
be 'provider', 'region', or 'zone', and the operator of
the match expression should be 'In' or 'NotIn'. If non-nil
and non-empty, only the clusters match this filter will
be selected.
properties:
matchExpressions:
description: A list of field selector requirements.
@ -412,9 +418,12 @@ spec:
type: array
fieldSelector:
description: FieldSelector is a filter to select
member clusters by fields. If non-nil and
non-empty, only the clusters match this filter
will be selected.
member clusters by fields. The key(field)
of the match expression should be 'provider',
'region', or 'zone', and the operator of the
match expression should be 'In' or 'NotIn'.
If non-nil and non-empty, only the clusters
match this filter will be selected.
properties:
matchExpressions:
description: A list of field selector requirements.

View File

@ -281,8 +281,11 @@ spec:
type: array
fieldSelector:
description: FieldSelector is a filter to select member
clusters by fields. If non-nil and non-empty, only the
clusters match this filter will be selected.
clusters by fields. The key(field) of the match expression
should be 'provider', 'region', or 'zone', and the operator
of the match expression should be 'In' or 'NotIn'. If
non-nil and non-empty, only the clusters match this filter
will be selected.
properties:
matchExpressions:
description: A list of field selector requirements.
@ -669,8 +672,10 @@ spec:
type: array
fieldSelector:
description: FieldSelector is a filter to select member clusters
by fields. If non-nil and non-empty, only the clusters match
this filter will be selected.
by fields. The key(field) of the match expression should be
'provider', 'region', or 'zone', and the operator of the match
expression should be 'In' or 'NotIn'. If non-nil and non-empty,
only the clusters match this filter will be selected.
properties:
matchExpressions:
description: A list of field selector requirements.

View File

@ -105,8 +105,11 @@ spec:
type: array
fieldSelector:
description: FieldSelector is a filter to select member
clusters by fields. If non-nil and non-empty, only the
clusters match this filter will be selected.
clusters by fields. The key(field) of the match expression
should be 'provider', 'region', or 'zone', and the operator
of the match expression should be 'In' or 'NotIn'. If
non-nil and non-empty, only the clusters match this filter
will be selected.
properties:
matchExpressions:
description: A list of field selector requirements.
@ -213,8 +216,11 @@ spec:
type: array
fieldSelector:
description: FieldSelector is a filter to select member clusters
by fields. If non-nil and non-empty, only the clusters match
this filter will be selected.
by fields. The key(field) of the match expression should
be 'provider', 'region', or 'zone', and the operator of
the match expression should be 'In' or 'NotIn'. If non-nil
and non-empty, only the clusters match this filter will
be selected.
properties:
matchExpressions:
description: A list of field selector requirements.
@ -408,9 +414,12 @@ spec:
type: array
fieldSelector:
description: FieldSelector is a filter to select
member clusters by fields. If non-nil and
non-empty, only the clusters match this filter
will be selected.
member clusters by fields. The key(field)
of the match expression should be 'provider',
'region', or 'zone', and the operator of the
match expression should be 'In' or 'NotIn'.
If non-nil and non-empty, only the clusters
match this filter will be selected.
properties:
matchExpressions:
description: A list of field selector requirements.

View File

@ -372,8 +372,11 @@ spec:
type: array
fieldSelector:
description: FieldSelector is a filter to select member
clusters by fields. If non-nil and non-empty, only the
clusters match this filter will be selected.
clusters by fields. The key(field) of the match expression
should be 'provider', 'region', or 'zone', and the operator
of the match expression should be 'In' or 'NotIn'. If
non-nil and non-empty, only the clusters match this filter
will be selected.
properties:
matchExpressions:
description: A list of field selector requirements.
@ -480,8 +483,11 @@ spec:
type: array
fieldSelector:
description: FieldSelector is a filter to select member clusters
by fields. If non-nil and non-empty, only the clusters match
this filter will be selected.
by fields. The key(field) of the match expression should
be 'provider', 'region', or 'zone', and the operator of
the match expression should be 'In' or 'NotIn'. If non-nil
and non-empty, only the clusters match this filter will
be selected.
properties:
matchExpressions:
description: A list of field selector requirements.
@ -675,9 +681,12 @@ spec:
type: array
fieldSelector:
description: FieldSelector is a filter to select
member clusters by fields. If non-nil and
non-empty, only the clusters match this filter
will be selected.
member clusters by fields. The key(field)
of the match expression should be 'provider',
'region', or 'zone', and the operator of the
match expression should be 'In' or 'NotIn'.
If non-nil and non-empty, only the clusters
match this filter will be selected.
properties:
matchExpressions:
description: A list of field selector requirements.

View File

@ -372,8 +372,11 @@ spec:
type: array
fieldSelector:
description: FieldSelector is a filter to select member
clusters by fields. If non-nil and non-empty, only the
clusters match this filter will be selected.
clusters by fields. The key(field) of the match expression
should be 'provider', 'region', or 'zone', and the operator
of the match expression should be 'In' or 'NotIn'. If
non-nil and non-empty, only the clusters match this filter
will be selected.
properties:
matchExpressions:
description: A list of field selector requirements.
@ -480,8 +483,11 @@ spec:
type: array
fieldSelector:
description: FieldSelector is a filter to select member clusters
by fields. If non-nil and non-empty, only the clusters match
this filter will be selected.
by fields. The key(field) of the match expression should
be 'provider', 'region', or 'zone', and the operator of
the match expression should be 'In' or 'NotIn'. If non-nil
and non-empty, only the clusters match this filter will
be selected.
properties:
matchExpressions:
description: A list of field selector requirements.
@ -675,9 +681,12 @@ spec:
type: array
fieldSelector:
description: FieldSelector is a filter to select
member clusters by fields. If non-nil and
non-empty, only the clusters match this filter
will be selected.
member clusters by fields. The key(field)
of the match expression should be 'provider',
'region', or 'zone', and the operator of the
match expression should be 'In' or 'NotIn'.
If non-nil and non-empty, only the clusters
match this filter will be selected.
properties:
matchExpressions:
description: A list of field selector requirements.

View File

@ -248,6 +248,8 @@ type ClusterAffinity struct {
LabelSelector *metav1.LabelSelector `json:"labelSelector,omitempty"`
// FieldSelector is a filter to select member clusters by fields.
// The key(field) of the match expression should be 'provider', 'region', or 'zone',
// and the operator of the match expression should be 'In' or 'NotIn'.
// If non-nil and non-empty, only the clusters match this filter will be selected.
// +optional
FieldSelector *FieldSelector `json:"fieldSelector,omitempty"`

View File

@ -2160,7 +2160,7 @@ func schema_pkg_apis_policy_v1alpha1_ClusterAffinity(ref common.ReferenceCallbac
},
"fieldSelector": {
SchemaProps: spec.SchemaProps{
Description: "FieldSelector is a filter to select member clusters by fields. If non-nil and non-empty, only the clusters match this filter will be selected.",
Description: "FieldSelector is a filter to select member clusters by fields. The key(field) of the match expression should be 'provider', 'region', or 'zone', and the operator of the match expression should be 'In' or 'NotIn'. If non-nil and non-empty, only the clusters match this filter will be selected.",
Ref: ref("github.com/karmada-io/karmada/pkg/apis/policy/v1alpha1.FieldSelector"),
},
},
@ -2225,7 +2225,7 @@ func schema_pkg_apis_policy_v1alpha1_ClusterAffinityTerm(ref common.ReferenceCal
},
"fieldSelector": {
SchemaProps: spec.SchemaProps{
Description: "FieldSelector is a filter to select member clusters by fields. If non-nil and non-empty, only the clusters match this filter will be selected.",
Description: "FieldSelector is a filter to select member clusters by fields. The key(field) of the match expression should be 'provider', 'region', or 'zone', and the operator of the match expression should be 'In' or 'NotIn'. If non-nil and non-empty, only the clusters match this filter will be selected.",
Ref: ref("github.com/karmada-io/karmada/pkg/apis/policy/v1alpha1.FieldSelector"),
},
},