Skip to content

Commit

Permalink
* Add the helm chart for Vineyard Runtime.
Browse files Browse the repository at this point in the history
* Add an option for worker to wait for the master ready.
* Delete the option 'etcd.prefix' in ExternalEndpoint as user can set it in the worker's options.
* Add the kubebuilder markers to the vineyard runtime API.

Signed-off-by: Ye Cao <[email protected]>
  • Loading branch information
dashanji committed Dec 20, 2023
1 parent 69539a3 commit 604f676
Show file tree
Hide file tree
Showing 15 changed files with 1,127 additions and 45 deletions.
8 changes: 4 additions & 4 deletions api/v1alpha1/openapi_generated.go

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

6 changes: 3 additions & 3 deletions api/v1alpha1/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -1420,7 +1420,7 @@
}
},
"options": {
"description": "Configurable options for External Etcd cluster. Support the following options.\n\n etcd.prefix: (String) the prefix of etcd key for vineyard objects\n\nDefault value is as follows.\n\n etcd.prefix: \"/vineyard\"",
"description": "Configurable options for External Etcd cluster.",
"type": "object",
"additionalProperties": {
"type": "string",
Expand Down Expand Up @@ -2497,7 +2497,7 @@
}
},
"options": {
"description": "Configurable options for Vineyard component. For Master, there is no configurable options. For Worker, support the following options.\n\n vineyardd.reserve.memory: (Bool) where to reserve memory for vineyardd\n If set to true, the memory quota will be counted to the vineyardd rather than the application.\n etcd.prefix: (String) the prefix of etcd key for vineyard objects\n\n Default value is as follows.\n\n vineyardd.reserve.memory: \"true\"\n etcd.prefix: \"/vineyard\"",
"description": "Configurable options for Vineyard component. For Master, there is no configurable options. For Worker, support the following options.\n\n vineyardd.reserve.memory: (Bool) where to reserve memory for vineyardd\n If set to true, the memory quota will be counted to the vineyardd rather than the application.\n etcd.prefix: (String) the prefix of etcd key for vineyard objects\n wait.etcd.timeout: (String) the timeout period before waiting the etcd to be ready, in seconds\n\n Default value is as follows.\n\n vineyardd.reserve.memory: \"true\"\n etcd.prefix: \"/vineyard\"\n wait.etcd.timeout: \"120\"",
"type": "object",
"additionalProperties": {
"type": "string",
Expand Down Expand Up @@ -3606,7 +3606,7 @@
}
},
"options": {
"description": "Configurable options for Vineyard component. For Master, there is no configurable options. For Worker, support the following options.\n\n vineyardd.reserve.memory: (Bool) where to reserve memory for vineyardd\n If set to true, the memory quota will be counted to the vineyardd rather than the application.\n etcd.prefix: (String) the prefix of etcd key for vineyard objects\n\n Default value is as follows.\n\n vineyardd.reserve.memory: \"true\"\n etcd.prefix: \"/vineyard\"",
"description": "Configurable options for Vineyard component. For Master, there is no configurable options. For Worker, support the following options.\n\n vineyardd.reserve.memory: (Bool) where to reserve memory for vineyardd\n If set to true, the memory quota will be counted to the vineyardd rather than the application.\n etcd.prefix: (String) the prefix of etcd key for vineyard objects\n wait.etcd.timeout: (String) the timeout period before waiting the etcd to be ready, in seconds\n\n Default value is as follows.\n\n vineyardd.reserve.memory: \"true\"\n etcd.prefix: \"/vineyard\"\n wait.etcd.timeout: \"120\"",
"type": "object",
"additionalProperties": {
"type": "string",
Expand Down
36 changes: 23 additions & 13 deletions api/v1alpha1/vineyardruntime_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,14 @@ type VineyardCompTemplateSpec struct {
// vineyardd.reserve.memory: (Bool) where to reserve memory for vineyardd
// If set to true, the memory quota will be counted to the vineyardd rather than the application.
// etcd.prefix: (String) the prefix of etcd key for vineyard objects
// wait.etcd.timeout: (String) the timeout period before waiting the etcd to be ready, in seconds
//
//
// Default value is as follows.
//
// vineyardd.reserve.memory: "true"
// etcd.prefix: "/vineyard"
// wait.etcd.timeout: "120"
//
// +optional
Options map[string]string `json:"options,omitempty"`
Expand Down Expand Up @@ -108,14 +110,6 @@ type ExternalEndpointSpec struct {
EncryptOptions []EncryptOption `json:"encryptOptions,omitempty"`

// Configurable options for External Etcd cluster.
// Support the following options.
//
// etcd.prefix: (String) the prefix of etcd key for vineyard objects
//
// Default value is as follows.
//
// etcd.prefix: "/vineyard"
//
// +optional
Options map[string]string `json:"options,omitempty"`
}
Expand Down Expand Up @@ -235,10 +229,25 @@ type VineyardRuntimeSpec struct {
Volumes []corev1.Volume `json:"volumes,omitempty"`
}

//+kubebuilder:object:root=true
//+kubebuilder:subresource:status

// VineyardRuntime is the Schema for the vineyardruntimes API
// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.currentWorkerNumberScheduled,selectorpath=.status.selector
// +kubebuilder:printcolumn:name="Ready Masters",type="integer",JSONPath=`.status.masterNumberReady`,priority=10
// +kubebuilder:printcolumn:name="Desired Masters",type="integer",JSONPath=`.status.desiredMasterNumberScheduled`,priority=10
// +kubebuilder:printcolumn:name="Master Phase",type="string",JSONPath=`.status.masterPhase`,priority=0
// +kubebuilder:printcolumn:name="Ready Workers",type="integer",JSONPath=`.status.workerNumberReady`,priority=10
// +kubebuilder:printcolumn:name="Desired Workers",type="integer",JSONPath=`.status.desiredWorkerNumberScheduled`,priority=10
// +kubebuilder:printcolumn:name="Worker Phase",type="string",JSONPath=`.status.workerPhase`,priority=0
// +kubebuilder:printcolumn:name="Ready Fuses",type="integer",JSONPath=`.status.fuseNumberReady`,priority=10
// +kubebuilder:printcolumn:name="Desired Fuses",type="integer",JSONPath=`.status.desiredFuseNumberScheduled`,priority=10
// +kubebuilder:printcolumn:name="Fuse Phase",type="string",JSONPath=`.status.fusePhase`,priority=0
// +kubebuilder:printcolumn:name="API Gateway",type="string",JSONPath=`.status.apiGateway.endpoint`,priority=10
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=`.metadata.creationTimestamp`,priority=0
// +kubebuilder:resource:scope=Namespaced
// +kubebuilder:resource:categories={fluid},shortName=vineyard
// +genclient

// VineyardRuntime is the Schema for the VineyardRuntimes API
type VineyardRuntime struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand All @@ -247,7 +256,8 @@ type VineyardRuntime struct {
Status RuntimeStatus `json:"status,omitempty"`
}

//+kubebuilder:object:root=true
// +kubebuilder:object:root=true
// +kubebuilder:resource:scope=Namespaced

// VineyardRuntimeList contains a list of VineyardRuntime
type VineyardRuntimeList struct {
Expand Down
5 changes: 0 additions & 5 deletions charts/alluxio/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,6 @@ master:
# mountPath: /data/secrets/mySecretVolume/
# - name: myConfigMapVolume
# mountPath: /data/configmap/myConfigMapVolume/
# volumeMounts:
# - name: mySecretVolume
# mountPath: /data/secrets/mySecretVolume/
# - name: myConfigMapVolume
# mountPath: /data/configmap/myConfigMapVolume/
volumes: []

mountConfigStorage:
Expand Down
70 changes: 60 additions & 10 deletions charts/fluid/fluid/crds/data.fluid.io_vineyardruntimes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,61 @@ metadata:
spec:
group: data.fluid.io
names:
categories:
- fluid
kind: VineyardRuntime
listKind: VineyardRuntimeList
plural: vineyardruntimes
shortNames:
- vineyard
singular: vineyardruntime
scope: Namespaced
versions:
- name: v1alpha1
- additionalPrinterColumns:
- jsonPath: .status.masterNumberReady
name: Ready Masters
priority: 10
type: integer
- jsonPath: .status.desiredMasterNumberScheduled
name: Desired Masters
priority: 10
type: integer
- jsonPath: .status.masterPhase
name: Master Phase
type: string
- jsonPath: .status.workerNumberReady
name: Ready Workers
priority: 10
type: integer
- jsonPath: .status.desiredWorkerNumberScheduled
name: Desired Workers
priority: 10
type: integer
- jsonPath: .status.workerPhase
name: Worker Phase
type: string
- jsonPath: .status.fuseNumberReady
name: Ready Fuses
priority: 10
type: integer
- jsonPath: .status.desiredFuseNumberScheduled
name: Desired Fuses
priority: 10
type: integer
- jsonPath: .status.fusePhase
name: Fuse Phase
type: string
- jsonPath: .status.apiGateway.endpoint
name: API Gateway
priority: 10
type: string
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
name: v1alpha1
schema:
openAPIV3Schema:
description: VineyardRuntime is the Schema for the vineyardruntimes API
description: VineyardRuntime is the Schema for the VineyardRuntimes API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
Expand Down Expand Up @@ -133,10 +178,7 @@ spec:
options:
additionalProperties:
type: string
description: "Configurable options for External Etcd cluster.
Support the following options. \n etcd.prefix: (String)
the prefix of etcd key for vineyard objects \n Default value
is as follows. \n etcd.prefix: \"/vineyard\""
description: Configurable options for External Etcd cluster.
type: object
uri:
description: URI specifies the endpoint of external Etcd cluster
Expand Down Expand Up @@ -182,8 +224,10 @@ spec:
to reserve memory for vineyardd If set to true, the memory quota
will be counted to the vineyardd rather than the application.
etcd.prefix: (String) the prefix of etcd key for vineyard objects
\n Default value is as follows. \n vineyardd.reserve.memory:
\"true\" etcd.prefix: \"/vineyard\""
wait.etcd.timeout: (String) the timeout period before waiting
the etcd to be ready, in seconds \n Default value is as follows.
\n vineyardd.reserve.memory: \"true\" etcd.prefix: \"/vineyard\"
wait.etcd.timeout: \"120\""
type: object
ports:
additionalProperties:
Expand Down Expand Up @@ -3462,8 +3506,10 @@ spec:
to reserve memory for vineyardd If set to true, the memory quota
will be counted to the vineyardd rather than the application.
etcd.prefix: (String) the prefix of etcd key for vineyard objects
\n Default value is as follows. \n vineyardd.reserve.memory:
\"true\" etcd.prefix: \"/vineyard\""
wait.etcd.timeout: (String) the timeout period before waiting
the etcd to be ready, in seconds \n Default value is as follows.
\n vineyardd.reserve.memory: \"true\" etcd.prefix: \"/vineyard\"
wait.etcd.timeout: \"120\""
type: object
ports:
additionalProperties:
Expand Down Expand Up @@ -3983,6 +4029,10 @@ spec:
served: true
storage: true
subresources:
scale:
labelSelectorPath: .status.selector
specReplicasPath: .spec.replicas
statusReplicasPath: .status.currentWorkerNumberScheduled
status: {}
status:
acceptedNames:
Expand Down
17 changes: 17 additions & 0 deletions charts/vineyard/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: v1
appVersion: 0.18.2
version: 0.18.2
description: an In-Memory Data Manager for Data-Intensive Analytics
home: https://v6d.io/
keywords:
- data/object manager
- shared memory
- cloud native
maintainers:
- name: Tao He
email: [email protected]
- name: Shumin Yuan
email: [email protected]
- name: Ye Cao
email: [email protected]
name: vineyard
Loading

0 comments on commit 604f676

Please sign in to comment.