Skip to content

Commit

Permalink
Support toleration and fix exclusive label deletion issue (fluid-clou…
Browse files Browse the repository at this point in the history
…dnative#578)

* Add Toleration to dataset spec

Signed-off-by: cheyang <[email protected]>

* add toleration to dataset

* Add Toleration to dataset spec

Signed-off-by: cheyang <[email protected]>

* Add Toleration to dataset spec

Signed-off-by: cheyang <[email protected]>

* Add Toleration to dataset spec

Signed-off-by: cheyang <[email protected]>

* Fix exclusiveKey failed to delete issue

Signed-off-by: cheyang <[email protected]>

* Fix docs

Signed-off-by: cheyang <[email protected]>

* Fix exclusiveKey failed to delete issue

Signed-off-by: cheyang <[email protected]>

* update crd

* Fix exclusiveKey failed to delete issue

Signed-off-by: cheyang <[email protected]>

* Fix exclusiveKey failed to delete issue

Signed-off-by: cheyang <[email protected]>

* Fix exclusiveKey failed to delete issue

Signed-off-by: cheyang <[email protected]>

* Check master status before cleaning up cache

Signed-off-by: cheyang <[email protected]>

* Check master status before cleaning up cache

Signed-off-by: cheyang <[email protected]>

* Check master status before cleaning up cache

Signed-off-by: cheyang <[email protected]>

* Check master status before cleaning up cache

Signed-off-by: cheyang <[email protected]>

* Check master status before cleaning up cache

Signed-off-by: cheyang <[email protected]>

* Check master status before cleaning up cache

Signed-off-by: cheyang <[email protected]>
  • Loading branch information
cheyang authored Feb 9, 2021
1 parent ecceb63 commit a56e352
Show file tree
Hide file tree
Showing 25 changed files with 443 additions and 42 deletions.
4 changes: 4 additions & 0 deletions api/v1alpha1/dataset_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ type DatasetSpec struct {
// +optional
NodeAffinity *CacheableNodeAffinity `json:"nodeAffinity,omitempty"`

// If specified, the pod's tolerations.
// +optional
Tolerations []v1.Toleration `json:"tolerations,omitempty"`

// AccessModes contains all ways the volume backing the PVC can be mounted
// +optional
AccessModes []v1.PersistentVolumeAccessMode `json:"accessModes,omitempty"`
Expand Down
7 changes: 7 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.

7 changes: 7 additions & 0 deletions charts/alluxio/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,3 +169,10 @@
- Make the port configurable
- Make the cache worker directory configurable


0.6.18

- support HDFS configuration file
- suppport metadata backup
- support tolerations

4 changes: 4 additions & 0 deletions charts/alluxio/templates/fuse/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ spec:
{{ toYaml .Values.fuse.nodeSelector | trim | indent 8 }}
{{- else if .Values.nodeSelector }}
{{ toYaml .Values.nodeSelector | trim | indent 8 }}
{{- end }}
{{- if .Values.tolerations }}
tolerations:
{{ toYaml .Values.tolerations | indent 8 }}
{{- end }}
securityContext:
fsGroup: {{ .Values.fuse.fsGroup }}
Expand Down
4 changes: 4 additions & 0 deletions charts/alluxio/templates/master/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ spec:
{{- end }}
securityContext:
fsGroup: {{ .Values.fsGroup }}
{{- if .Values.tolerations }}
tolerations:
{{ toYaml .Values.tolerations | indent 8 }}
{{- end }}
affinity:
{{- if .Values.master.affinity }}
{{ toYaml .Values.master.affinity | indent 8 }}
Expand Down
4 changes: 4 additions & 0 deletions charts/alluxio/templates/worker/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ spec:
{{ toYaml .Values.worker.nodeSelector | trim | indent 8 }}
{{- else if .Values.nodeSelector }}
{{ toYaml .Values.nodeSelector | trim | indent 8 }}
{{- end }}
{{- if .Values.tolerations }}
tolerations:
{{ toYaml .Values.tolerations | indent 8 }}
{{- end }}
initContainers:
{{ if .Values.initUsers.enabled -}}
Expand Down
11 changes: 11 additions & 0 deletions charts/alluxio/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,17 @@ properties:
# Use labels to run Alluxio on a subset of the K8s nodes
# nodeSelector: {}

##
## Example:
## - key: "toleration=key"
## operator: "Equal"
## value: "value"
## effect: "NoSchedule"
##
## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
##
tolerations: []

## Master ##

master:
Expand Down
2 changes: 1 addition & 1 deletion charts/fluid/fluid/crds/data.fluid.io_databackups.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ spec:
in the form of local://subpath
type: string
path:
description: Path describes the path of backup, in the form of local://subpath
description: Path describes the path of backup, in the form of local:///absolutePath
or pvc://<pvcName>/subpath
type: string
type: object
Expand Down
40 changes: 40 additions & 0 deletions charts/fluid/fluid/crds/data.fluid.io_datasets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,46 @@ spec:
type: string
type: object
type: array
tolerations:
description: If specified, the pod's tolerations.
items:
description: The pod this Toleration is attached to tolerates any
taint that matches the triple <key,value,effect> using the matching
operator <operator>.
properties:
effect:
description: Effect indicates the taint effect to match. Empty
means match all taint effects. When specified, allowed values
are NoSchedule, PreferNoSchedule and NoExecute.
type: string
key:
description: Key is the taint key that the toleration applies
to. Empty means match all taint keys. If the key is empty, operator
must be Exists; this combination means to match all values and
all keys.
type: string
operator:
description: Operator represents a key's relationship to the value.
Valid operators are Exists and Equal. Defaults to Equal. Exists
is equivalent to wildcard for value, so that a pod can tolerate
all taints of a particular category.
type: string
tolerationSeconds:
description: TolerationSeconds represents the period of time the
toleration (which must be of effect NoExecute, otherwise this
field is ignored) tolerates the taint. By default, it is not
set, which means tolerate the taint forever (do not evict).
Zero and negative values will be treated as 0 (evict immediately)
by the system.
format: int64
type: integer
value:
description: Value is the taint value the toleration matches to.
If the operator is Exists, the value should be empty, otherwise
just a regular string.
type: string
type: object
type: array
type: object
status:
description: DatasetStatus defines the observed state of Dataset
Expand Down
10 changes: 5 additions & 5 deletions charts/fluid/fluid/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ workdir: /tmp

dataset:
controller:
image: registry.cn-hangzhou.aliyuncs.com/fluid/dataset-controller:v0.5.0-4be7c32
image: registry.cn-hangzhou.aliyuncs.com/fluid/dataset-controller:v0.5.0-b232d49

csi:
registrar:
image: registry.cn-hangzhou.aliyuncs.com/acs/csi-node-driver-registrar:v1.2.0
plugins:
image: registry.cn-hangzhou.aliyuncs.com/fluid/fluid-csi:v0.5.0-4be7c32
image: registry.cn-hangzhou.aliyuncs.com/fluid/fluid-csi:v0.5.0-b232d49
kubelet:
rootDir: /var/lib/kubelet

Expand All @@ -21,14 +21,14 @@ runtime:
alluxio:
enabled: true
init:
image: registry.cn-hangzhou.aliyuncs.com/fluid/init-users:v0.5.0-4be7c32
image: registry.cn-hangzhou.aliyuncs.com/fluid/init-users:v0.5.0-b232d49
controller:
image: registry.cn-hangzhou.aliyuncs.com/fluid/alluxioruntime-controller:v0.5.0-4be7c32
image: registry.cn-hangzhou.aliyuncs.com/fluid/alluxioruntime-controller:v0.5.0-b232d49
runtime:
image: registry.cn-huhehaote.aliyuncs.com/alluxio/alluxio:2.4.1-2-SNAPSHOT-f4676d3
fuse:
image: registry.cn-huhehaote.aliyuncs.com/alluxio/alluxio-fuse:2.4.1-2-SNAPSHOT-f4676d3
jindo:
enabled: false
controller:
image: registry.cn-hangzhou.aliyuncs.com/fluid/jindoruntime-controller:v0.5.0-4be7c32
image: registry.cn-hangzhou.aliyuncs.com/fluid/jindoruntime-controller:v0.5.0-b232d49
2 changes: 1 addition & 1 deletion config/crd/bases/data.fluid.io_databackups.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ spec:
in the form of local://subpath
type: string
path:
description: Path describes the path of backup, in the form of local://subpath
description: Path describes the path of backup, in the form of local:///absolutePath
or pvc://<pvcName>/subpath
type: string
type: object
Expand Down
40 changes: 40 additions & 0 deletions config/crd/bases/data.fluid.io_datasets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,46 @@ spec:
type: string
type: object
type: array
tolerations:
description: If specified, the pod's tolerations.
items:
description: The pod this Toleration is attached to tolerates any
taint that matches the triple <key,value,effect> using the matching
operator <operator>.
properties:
effect:
description: Effect indicates the taint effect to match. Empty
means match all taint effects. When specified, allowed values
are NoSchedule, PreferNoSchedule and NoExecute.
type: string
key:
description: Key is the taint key that the toleration applies
to. Empty means match all taint keys. If the key is empty, operator
must be Exists; this combination means to match all values and
all keys.
type: string
operator:
description: Operator represents a key's relationship to the value.
Valid operators are Exists and Equal. Defaults to Equal. Exists
is equivalent to wildcard for value, so that a pod can tolerate
all taints of a particular category.
type: string
tolerationSeconds:
description: TolerationSeconds represents the period of time the
toleration (which must be of effect NoExecute, otherwise this
field is ignored) tolerates the taint. By default, it is not
set, which means tolerate the taint forever (do not evict).
Zero and negative values will be treated as 0 (evict immediately)
by the system.
format: int64
type: integer
value:
description: Value is the taint value the toleration matches to.
If the operator is Exists, the value should be empty, otherwise
just a regular string.
type: string
type: object
type: array
type: object
status:
description: DatasetStatus defines the observed state of Dataset
Expand Down
1 change: 1 addition & 0 deletions docs/zh/TOC.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
- [数据加速(通过HDFS接口访问)](samples/accelerate_data_accessing_by_hdfs.md)
- [使用参数加密](samples/use_encryptoptions.md)
- [缓存亲和性调度](samples/data_co_locality.md)
- [缓存容忍污点调度](samples/data_toleration.md)
- [机器学习](samples/machinelearning.md)
- [主机目录加速](samples/hostpath.md)
- [数据卷加速](samples/accelerate_pvc.md)
Expand Down
Loading

0 comments on commit a56e352

Please sign in to comment.