Skip to content

Commit

Permalink
Add multi dataset in single node switch (fluid-cloudnative#486)
Browse files Browse the repository at this point in the history
* Add multi dataset in single node swicth

* Add Exclusiveness on dataset and scheduler worker by node label

* fix comment by cheyang

* fix comment by cheyang

* change crd and api_doc

* change monitoring and exclusiveness default to true and fix comment by xzh

* change monitoring and exclusiveness default to false
  • Loading branch information
xieydd authored Dec 27, 2020
1 parent 2044e74 commit 7e894d6
Show file tree
Hide file tree
Showing 23 changed files with 532 additions and 349 deletions.
3 changes: 2 additions & 1 deletion api/v1alpha1/alluxioruntime_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ type AlluxioRuntimeSpec struct {
// Tiered storage used by Alluxio
Tieredstore Tieredstore `json:"tieredstore,omitempty"`

//Management strategies for the dataset to which the runtime is bound
// Management strategies for the dataset to which the runtime is bound
Data Data `json:"data,omitempty"`

// The replicas of the worker, need to be specified
Expand All @@ -215,6 +215,7 @@ type AlluxioRuntimeSpec struct {
RunAs *User `json:"runAs,omitempty"`

// Manage monitoring for Alluxio Runtime
// +optional
Monitoring bool `json:"monitoring,omitempty"`
}

Expand Down
7 changes: 6 additions & 1 deletion api/v1alpha1/dataset_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package v1alpha1
import (
// "github.com/rook/rook/pkg/apis/rook.io/v1"
"github.com/fluid-cloudnative/fluid/pkg/common"
"k8s.io/api/core/v1"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

Expand Down Expand Up @@ -123,6 +123,11 @@ type DatasetSpec struct {

// Runtimes for supporting dataset (e.g. AlluxioRuntime)
Runtimes []Runtime `json:"runtimes,omitempty"`

// Manage switch for opening Multiple datasets single node deployment or not
// TODO(xieydd) In future, evaluate node resources and runtime resources to decide whether to turn them on
// +optional
ExclusiveMode bool `json:"exclusiveMode,omitempty"`
}

// Runtime describes a runtime to be used to support dataset
Expand Down
3 changes: 3 additions & 0 deletions charts/fluid/fluid/crds/data.fluid.io_alluxioruntimes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,9 @@ spec:
type: object
type: object
type: object
monitoring:
description: Manage monitoring for Alluxio Runtime
type: boolean
properties:
additionalProperties:
type: string
Expand Down
5 changes: 5 additions & 0 deletions charts/fluid/fluid/crds/data.fluid.io_datasets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ spec:
items:
type: string
type: array
exclusiveMode:
description: Manage switch for opening Multiple datasets single node
deployment or not TODO(xieydd) In future, evaluate node resources
and runtime resources to decide whether to turn them on
type: boolean
mounts:
description: Mount Points to be mounted on Alluxio.
items:
Expand Down
104 changes: 52 additions & 52 deletions charts/fluid/fluid/crds/data.fluid.io_jindoruntimes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ metadata:
name: jindoruntimes.data.fluid.io
spec:
additionalPrinterColumns:
- JSONPath: .status.masterNumberReady
name: Ready Masters
priority: 10
type: integer
- JSONPath: .status.workerNumberReady
name: Ready Workers
priority: 10
type: integer
- JSONPath: .status.fuseNumberReady
name: Ready Fuses
priority: 10
type: integer
- JSONPath: .status.masterNumberReady
name: Ready Masters
priority: 10
type: integer
- JSONPath: .status.workerNumberReady
name: Ready Workers
priority: 10
type: integer
- JSONPath: .status.fuseNumberReady
name: Ready Fuses
priority: 10
type: integer
group: data.fluid.io
names:
kind: JindoRuntime
Expand Down Expand Up @@ -85,8 +85,8 @@ spec:
limits:
additionalProperties:
anyOf:
- type: integer
- type: string
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
description: 'Limits describes the maximum amount of compute
Expand All @@ -95,8 +95,8 @@ spec:
requests:
additionalProperties:
anyOf:
- type: integer
- type: string
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
description: 'Requests describes the minimum amount of compute
Expand Down Expand Up @@ -155,8 +155,8 @@ spec:
limits:
additionalProperties:
anyOf:
- type: integer
- type: string
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
description: 'Limits describes the maximum amount of compute
Expand All @@ -165,8 +165,8 @@ spec:
requests:
additionalProperties:
anyOf:
- type: integer
- type: string
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
description: 'Requests describes the minimum amount of compute
Expand Down Expand Up @@ -203,10 +203,10 @@ spec:
description: The user name to run the alluxio runtime
type: string
required:
- gid
- group
- uid
- user
- gid
- group
- uid
- user
type: object
tieredstore:
description: Tiered storage used by Jindo
Expand All @@ -228,23 +228,23 @@ spec:
description: 'Medium Type of the tier. One of the three types:
`MEM`, `SSD`, `HDD`'
enum:
- MEM
- SSD
- HDD
- MEM
- SSD
- HDD
type: string
path:
description: File path to be used for the tier (e.g. /mnt/ramdisk)
minLength: 1
type: string
quota:
anyOf:
- type: integer
- type: string
- type: integer
- type: string
description: Quota for the tier. (e.g. 100GB)
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
required:
- mediumtype
- mediumtype
type: object
type: array
type: object
Expand Down Expand Up @@ -282,8 +282,8 @@ spec:
limits:
additionalProperties:
anyOf:
- type: integer
- type: string
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
description: 'Limits describes the maximum amount of compute
Expand All @@ -292,8 +292,8 @@ spec:
requests:
additionalProperties:
anyOf:
- type: integer
- type: string
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
description: 'Requests describes the minimum amount of compute
Expand Down Expand Up @@ -342,8 +342,8 @@ spec:
description: Type of cache condition.
type: string
required:
- status
- type
- status
- type
type: object
type: array
currentFuseNumberScheduled:
Expand Down Expand Up @@ -440,26 +440,26 @@ spec:
description: Reason for Worker's condition transition
type: string
required:
- currentFuseNumberScheduled
- currentMasterNumberScheduled
- currentWorkerNumberScheduled
- desiredFuseNumberScheduled
- desiredMasterNumberScheduled
- desiredWorkerNumberScheduled
- fuseNumberReady
- fusePhase
- masterNumberReady
- masterPhase
- valueFile
- workerNumberReady
- workerPhase
- currentFuseNumberScheduled
- currentMasterNumberScheduled
- currentWorkerNumberScheduled
- desiredFuseNumberScheduled
- desiredMasterNumberScheduled
- desiredWorkerNumberScheduled
- fuseNumberReady
- fusePhase
- masterNumberReady
- masterPhase
- valueFile
- workerNumberReady
- workerPhase
type: object
type: object
version: v1alpha1
versions:
- name: v1alpha1
served: true
storage: true
- name: v1alpha1
served: true
storage: true
status:
acceptedNames:
kind: ""
Expand Down
3 changes: 3 additions & 0 deletions config/crd/bases/data.fluid.io_alluxioruntimes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,9 @@ spec:
type: object
type: object
type: object
monitoring:
description: Manage monitoring for Alluxio Runtime
type: boolean
properties:
additionalProperties:
type: string
Expand Down
5 changes: 5 additions & 0 deletions config/crd/bases/data.fluid.io_datasets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ spec:
items:
type: string
type: array
exclusiveMode:
description: Manage switch for opening Multiple datasets single node
deployment or not TODO(xieydd) In future, evaluate node resources
and runtime resources to decide whether to turn them on
type: boolean
mounts:
description: Mount Points to be mounted on Alluxio.
items:
Expand Down
Loading

0 comments on commit 7e894d6

Please sign in to comment.