Skip to content

Commit

Permalink
fix conflict and use nodeAffinity
Browse files Browse the repository at this point in the history
Signed-off-by: xliuqq <xlzq1992@gmail.com>
  • Loading branch information
xliuqq committed Apr 29, 2024
1 parent 6a70657 commit 5bbc2a3
Show file tree
Hide file tree
Showing 17 changed files with 1,816 additions and 127 deletions.
21 changes: 6 additions & 15 deletions api/v1alpha1/openapi_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/v1alpha1/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ type OperationStatus struct {
// WaitingStatus stores information about waiting operation.
WaitingFor WaitingStatus `json:"waitingFor,omitempty"`

// NodeAffinity defines the node labels for operation pods
// NodeAffinity records the node affinity for operation pods
NodeAffinity *corev1.NodeAffinity `json:"nodeAffinity,omitempty"`
}

Expand Down
6 changes: 2 additions & 4 deletions api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

199 changes: 195 additions & 4 deletions charts/fluid/fluid/crds/data.fluid.io_databackups.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ spec:
type: string
prefer:
items:
description: Prefer defines the label key and weight for
generating a PreferredSchedulingTerm.
properties:
name:
type: string
Expand Down Expand Up @@ -200,10 +202,199 @@ spec:
successfully completed
format: date-time
type: string
nodeLabels:
additionalProperties:
type: string
description: NodeLabels defines the node labels for operation pods
nodeAffinity:
description: NodeAffinity records the node affinity for operation
pods
properties:
preferredDuringSchedulingIgnoredDuringExecution:
description: The scheduler will prefer to schedule pods to nodes
that satisfy the affinity expressions specified by this field,
but it may choose a node that violates one or more of the expressions.
The node that is most preferred is the one with the greatest
sum of weights, i.e. for each node that meets all of the scheduling
requirements (resource request, requiredDuringScheduling affinity
expressions, etc.), compute a sum by iterating through the elements
of this field and adding "weight" to the sum if the node matches
the corresponding matchExpressions; the node(s) with the highest
sum are the most preferred.
items:
description: An empty preferred scheduling term matches all
objects with implicit weight 0 (i.e. it's a no-op). A null
preferred scheduling term matches no objects (i.e. is also
a no-op).
properties:
preference:
description: A node selector term, associated with the corresponding
weight.
properties:
matchExpressions:
description: A list of node selector requirements by
node's labels.
items:
description: A node selector requirement is a selector
that contains values, a key, and an operator that
relates the key and values.
properties:
key:
description: The label key that the selector applies
to.
type: string
operator:
description: Represents a key's relationship to
a set of values. Valid operators are In, NotIn,
Exists, DoesNotExist. Gt, and Lt.
type: string
values:
description: An array of string values. If the
operator is In or NotIn, the values array must
be non-empty. If the operator is Exists or DoesNotExist,
the values array must be empty. If the operator
is Gt or Lt, the values array must have a single
element, which will be interpreted as an integer.
This array is replaced during a strategic merge
patch.
items:
type: string
type: array
required:
- key
- operator
type: object
type: array
matchFields:
description: A list of node selector requirements by
node's fields.
items:
description: A node selector requirement is a selector
that contains values, a key, and an operator that
relates the key and values.
properties:
key:
description: The label key that the selector applies
to.
type: string
operator:
description: Represents a key's relationship to
a set of values. Valid operators are In, NotIn,
Exists, DoesNotExist. Gt, and Lt.
type: string
values:
description: An array of string values. If the
operator is In or NotIn, the values array must
be non-empty. If the operator is Exists or DoesNotExist,
the values array must be empty. If the operator
is Gt or Lt, the values array must have a single
element, which will be interpreted as an integer.
This array is replaced during a strategic merge
patch.
items:
type: string
type: array
required:
- key
- operator
type: object
type: array
type: object
weight:
description: Weight associated with matching the corresponding
nodeSelectorTerm, in the range 1-100.
format: int32
type: integer
required:
- preference
- weight
type: object
type: array
requiredDuringSchedulingIgnoredDuringExecution:
description: If the affinity requirements specified by this field
are not met at scheduling time, the pod will not be scheduled
onto the node. If the affinity requirements specified by this
field cease to be met at some point during pod execution (e.g.
due to an update), the system may or may not try to eventually
evict the pod from its node.
properties:
nodeSelectorTerms:
description: Required. A list of node selector terms. The
terms are ORed.
items:
description: A null or empty node selector term matches
no objects. The requirements of them are ANDed. The TopologySelectorTerm
type implements a subset of the NodeSelectorTerm.
properties:
matchExpressions:
description: A list of node selector requirements by
node's labels.
items:
description: A node selector requirement is a selector
that contains values, a key, and an operator that
relates the key and values.
properties:
key:
description: The label key that the selector applies
to.
type: string
operator:
description: Represents a key's relationship to
a set of values. Valid operators are In, NotIn,
Exists, DoesNotExist. Gt, and Lt.
type: string
values:
description: An array of string values. If the
operator is In or NotIn, the values array must
be non-empty. If the operator is Exists or DoesNotExist,
the values array must be empty. If the operator
is Gt or Lt, the values array must have a single
element, which will be interpreted as an integer.
This array is replaced during a strategic merge
patch.
items:
type: string
type: array
required:
- key
- operator
type: object
type: array
matchFields:
description: A list of node selector requirements by
node's fields.
items:
description: A node selector requirement is a selector
that contains values, a key, and an operator that
relates the key and values.
properties:
key:
description: The label key that the selector applies
to.
type: string
operator:
description: Represents a key's relationship to
a set of values. Valid operators are In, NotIn,
Exists, DoesNotExist. Gt, and Lt.
type: string
values:
description: An array of string values. If the
operator is In or NotIn, the values array must
be non-empty. If the operator is Exists or DoesNotExist,
the values array must be empty. If the operator
is Gt or Lt, the values array must have a single
element, which will be interpreted as an integer.
This array is replaced during a strategic merge
patch.
items:
type: string
type: array
required:
- key
- operator
type: object
type: array
type: object
type: array
required:
- nodeSelectorTerms
type: object
type: object
phase:
description: Phase describes current phase of operation
Expand Down
Loading

0 comments on commit 5bbc2a3

Please sign in to comment.