Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
15 changes: 15 additions & 0 deletions api/v1alpha1/dataload_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ limitations under the License.
package v1alpha1

import (
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

Expand Down Expand Up @@ -58,6 +59,20 @@ type DataLoadSpec struct {

// PodMetadata defines labels and annotations that will be propagated to DataLoad pods
PodMetadata PodMetadata `json:"podMetadata,omitempty"`

// +optional
// pod
Affinity *corev1.Affinity `json:"affinity,omitempty"`

// +optional
Tolerations []corev1.Toleration `json:"tolerations,omitempty"`

// +optional
// pod node selector
NodeSelector map[string]string `json:"nodeSelector,omitempty"`

// +optional
SchedulerName string `json:"schedulerName,omitempty"`
}

// +kubebuilder:printcolumn:name="Dataset",type="string",JSONPath=`.spec.dataset.name`
Expand Down
43 changes: 42 additions & 1 deletion api/v1alpha1/openapi_generated.go

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

19 changes: 19 additions & 0 deletions api/v1alpha1/zz_generated.deepcopy.go

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

3 changes: 3 additions & 0 deletions charts/fluid-dataloader/alluxio/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@
### 0.3.0

- Support configurable DataLoad pod metadata

### 0.9.0
- Dataload support Affinity,Tolerations,NodeSelector,SchedulerName
15 changes: 15 additions & 0 deletions charts/fluid-dataloader/alluxio/templates/dataloader.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,21 @@ spec:
{{- end }}
{{- end }}
spec:
{{- if .Values.dataloader.schedulerName }}
schedulerName: {{ .Values.dataloader.schedulerName }}
{{- end }}
{{- with .Values.dataloader.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.dataloader.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.dataloader.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
restartPolicy: Never
{{- with .Values.dataloader.imagePullSecrets }}
imagePullSecrets:
Expand Down
47 changes: 45 additions & 2 deletions charts/fluid-dataloader/alluxio/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ dataloader:

# Required
# Description: the dataset that this DataLoad targets
targetDataset: #imagenet
#targetDataset: imagenet
targetDataset: ""

# Optional
# Default: false
Expand All @@ -27,7 +28,8 @@ dataloader:

# Required
# Description: the image that the DataLoad job uses
image: #<alluxio-image>
#image: <alluxio-image>
image: ""

# Optional
# Description: optional labels on DataLoad pods
Expand All @@ -40,3 +42,44 @@ dataloader:
# Optional
# Description: optional image pull secrets on DataLoad pods
imagePullSecrets: []

# Optional
# Description: optional pod affinity
# affinity:
# nodeAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# nodeSelectorTerms:
# - matchExpressions:
# - key: topology.kubernetes.io/zone
# operator: In
# values:
# - antarctica-east1
# - antarctica-west1
# preferredDuringSchedulingIgnoredDuringExecution:
# - weight: 1
# preference:
# matchExpressions:
# - key: another-node-label-key
# operator: In
# values:
# - another-node-label-value
affinity: {}

# Optional
# Description: optional pod Tolerations
# tolerations:
# - key: "example-key"
# operator: "Exists"
# effect: "NoSchedule"
tolerations: []

# Optional
# Description: optional pod scheduler definition
# schedulerName: "scheduler"
schedulerName: ""

# Optional
# Description: optional pod node selector
# nodeSelector:
# diskType: "ssd"
nodeSelector: {}
2 changes: 1 addition & 1 deletion charts/fluid/fluid/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@
* Scale runtime controllers on demand

### 0.9.0
* Support pass image pull secrets from fluid charts to alluxioruntime controller
* Support pass image pull secrets from fluid charts to alluxioruntime controller
Loading