Skip to content

support dataflow affinity #3829

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions api/v1alpha1/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,8 @@ type AffinityStrategy struct {
// +optional
Policy AffinityPolicy `json:"policy,omitempty"`

Prefer []Prefer `json:"prefer,omitempty"`
Require []string `json:"require,omitempty"`
Prefer []Prefer `json:"prefer,omitempty"`
Require []Require `json:"require,omitempty"`
}

// Prefer defines the label key and weight for generating a PreferredSchedulingTerm.
Expand All @@ -268,6 +268,11 @@ type Prefer struct {
Weight int32 `json:"weight"`
}

// Require defines the label key for generating a NodeSelectorTerm.
type Require struct {
Name string `json:"name"`
}

type OperationRef struct {
// API version of the referent operation
// +optional
Expand All @@ -286,7 +291,7 @@ type OperationRef struct {
// +optional
Namespace string `json:"namespace,omitempty"`

// Namespace specifies the pod affinity strategy with the referent operation.
// AffinityStrategy specifies the pod affinity strategy with the referent operation.
// +optional
AffinityStrategy AffinityStrategy `json:"affinityStrategy,omitempty"`
}
Expand Down
31 changes: 26 additions & 5 deletions api/v1alpha1/openapi_generated.go

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

17 changes: 16 additions & 1 deletion api/v1alpha1/zz_generated.deepcopy.go

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

2 changes: 1 addition & 1 deletion charts/fluid-dataprocess/common/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ dataProcess:
volumes: []
volumeMounts: []
resources: {}
affinity:
affinity: {}
jobProcessor:
podSpec: {}
13 changes: 10 additions & 3 deletions charts/fluid/fluid/crds/data.fluid.io_databackups.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ spec:
description: Specifies that the preceding operation in a workflow
properties:
affinityStrategy:
description: Namespace specifies the pod affinity strategy with
the referent operation.
description: AffinityStrategy specifies the pod affinity strategy
with the referent operation.
properties:
policy:
description: 'Policy one of: "", "Require", "Prefer"'
Expand All @@ -92,7 +92,14 @@ spec:
type: array
require:
items:
type: string
description: Require defines the label key for generating
a NodeSelectorTerm.
properties:
name:
type: string
required:
- name
type: object
type: array
type: object
apiVersion:
Expand Down
13 changes: 10 additions & 3 deletions charts/fluid/fluid/crds/data.fluid.io_dataloads.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -957,8 +957,8 @@ spec:
description: Specifies that the preceding operation in a workflow
properties:
affinityStrategy:
description: Namespace specifies the pod affinity strategy with
the referent operation.
description: AffinityStrategy specifies the pod affinity strategy
with the referent operation.
properties:
policy:
description: 'Policy one of: "", "Require", "Prefer"'
Expand All @@ -980,7 +980,14 @@ spec:
type: array
require:
items:
type: string
description: Require defines the label key for generating
a NodeSelectorTerm.
properties:
name:
type: string
required:
- name
type: object
type: array
type: object
apiVersion:
Expand Down
13 changes: 10 additions & 3 deletions charts/fluid/fluid/crds/data.fluid.io_datamigrates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1023,8 +1023,8 @@ spec:
description: Specifies that the preceding operation in a workflow
properties:
affinityStrategy:
description: Namespace specifies the pod affinity strategy with
the referent operation.
description: AffinityStrategy specifies the pod affinity strategy
with the referent operation.
properties:
policy:
description: 'Policy one of: "", "Require", "Prefer"'
Expand All @@ -1046,7 +1046,14 @@ spec:
type: array
require:
items:
type: string
description: Require defines the label key for generating
a NodeSelectorTerm.
properties:
name:
type: string
required:
- name
type: object
type: array
type: object
apiVersion:
Expand Down
13 changes: 10 additions & 3 deletions charts/fluid/fluid/crds/data.fluid.io_dataprocesses.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9308,8 +9308,8 @@ spec:
description: Specifies that the preceding operation in a workflow
properties:
affinityStrategy:
description: Namespace specifies the pod affinity strategy with
the referent operation.
description: AffinityStrategy specifies the pod affinity strategy
with the referent operation.
properties:
policy:
description: 'Policy one of: "", "Require", "Prefer"'
Expand All @@ -9331,7 +9331,14 @@ spec:
type: array
require:
items:
type: string
description: Require defines the label key for generating
a NodeSelectorTerm.
properties:
name:
type: string
required:
- name
type: object
type: array
type: object
apiVersion:
Expand Down
4 changes: 4 additions & 0 deletions cmd/dataset/app/dataset.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ func handle() {
if fluidDiscovery.ResourceEnabled("dataload") {
setupLog.Info("Registering DataLoad reconciler to Fluid controller manager.")
if err = (dataloadctl.NewDataLoadReconciler(mgr.GetClient(),
mgr.GetAPIReader(),
ctrl.Log.WithName("dataloadctl").WithName("DataLoad"),
mgr.GetScheme(),
mgr.GetEventRecorderFor("DataLoad"),
Expand All @@ -180,6 +181,7 @@ func handle() {
if fluidDiscovery.ResourceEnabled("databackup") {
setupLog.Info("Registering DataBackup reconciler to Fluid controller manager.")
if err = (databackupctl.NewDataBackupReconciler(mgr.GetClient(),
mgr.GetAPIReader(),
ctrl.Log.WithName("databackupctl").WithName("DataBackup"),
mgr.GetScheme(),
mgr.GetEventRecorderFor("DataBackup"),
Expand All @@ -192,6 +194,7 @@ func handle() {
if fluidDiscovery.ResourceEnabled("datamigrate") {
setupLog.Info("Registering DataMigrate reconciler to Fluid controller manager.")
if err = (datamigratectl.NewDataMigrateReconciler(mgr.GetClient(),
mgr.GetAPIReader(),
ctrl.Log.WithName("datamigratectl").WithName("DataMigrate"),
mgr.GetScheme(),
mgr.GetEventRecorderFor("DataMigrate"),
Expand All @@ -204,6 +207,7 @@ func handle() {
if fluidDiscovery.ResourceEnabled("dataprocess") {
setupLog.Info("Registering DataProcess reconciler to Fluid controller manager.")
if err = (dataprocessctl.NewDataProcessReconciler(mgr.GetClient(),
mgr.GetAPIReader(),
ctrl.Log.WithName("dataprocessctl").WithName("DataProcess"),
mgr.GetScheme(),
mgr.GetEventRecorderFor("DataProcess"),
Expand Down
13 changes: 10 additions & 3 deletions config/crd/bases/data.fluid.io_databackups.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ spec:
description: Specifies that the preceding operation in a workflow
properties:
affinityStrategy:
description: Namespace specifies the pod affinity strategy with
the referent operation.
description: AffinityStrategy specifies the pod affinity strategy
with the referent operation.
properties:
policy:
description: 'Policy one of: "", "Require", "Prefer"'
Expand All @@ -92,7 +92,14 @@ spec:
type: array
require:
items:
type: string
description: Require defines the label key for generating
a NodeSelectorTerm.
properties:
name:
type: string
required:
- name
type: object
type: array
type: object
apiVersion:
Expand Down
13 changes: 10 additions & 3 deletions config/crd/bases/data.fluid.io_dataloads.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -957,8 +957,8 @@ spec:
description: Specifies that the preceding operation in a workflow
properties:
affinityStrategy:
description: Namespace specifies the pod affinity strategy with
the referent operation.
description: AffinityStrategy specifies the pod affinity strategy
with the referent operation.
properties:
policy:
description: 'Policy one of: "", "Require", "Prefer"'
Expand All @@ -980,7 +980,14 @@ spec:
type: array
require:
items:
type: string
description: Require defines the label key for generating
a NodeSelectorTerm.
properties:
name:
type: string
required:
- name
type: object
type: array
type: object
apiVersion:
Expand Down
13 changes: 10 additions & 3 deletions config/crd/bases/data.fluid.io_datamigrates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1023,8 +1023,8 @@ spec:
description: Specifies that the preceding operation in a workflow
properties:
affinityStrategy:
description: Namespace specifies the pod affinity strategy with
the referent operation.
description: AffinityStrategy specifies the pod affinity strategy
with the referent operation.
properties:
policy:
description: 'Policy one of: "", "Require", "Prefer"'
Expand All @@ -1046,7 +1046,14 @@ spec:
type: array
require:
items:
type: string
description: Require defines the label key for generating
a NodeSelectorTerm.
properties:
name:
type: string
required:
- name
type: object
type: array
type: object
apiVersion:
Expand Down
13 changes: 10 additions & 3 deletions config/crd/bases/data.fluid.io_dataprocesses.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9308,8 +9308,8 @@ spec:
description: Specifies that the preceding operation in a workflow
properties:
affinityStrategy:
description: Namespace specifies the pod affinity strategy with
the referent operation.
description: AffinityStrategy specifies the pod affinity strategy
with the referent operation.
properties:
policy:
description: 'Policy one of: "", "Require", "Prefer"'
Expand All @@ -9331,7 +9331,14 @@ spec:
type: array
require:
items:
type: string
description: Require defines the label key for generating
a NodeSelectorTerm.
properties:
name:
type: string
required:
- name
type: object
type: array
type: object
apiVersion:
Expand Down
Loading