Skip to content

Commit

Permalink
add configurable worker system info host path
Browse files Browse the repository at this point in the history
  • Loading branch information
ssz1997 committed Dec 1, 2023
1 parent 3f0fef3 commit 7aa6a33
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 2 deletions.
3 changes: 2 additions & 1 deletion api/v1alpha1/alluxiocluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ type WorkerSpec struct {
Affinity corev1.Affinity `json:"affinity,omitempty" yaml:"affinity,omitempty"`
Count int `json:"count,omitempty" yaml:"count,omitempty"`
Env map[string]string `json:"env,omitempty" yaml:"env,omitempty"`
HostPathForSystemInfo string `json:"hostPathForSystemInfo,omitempty" yaml:"hostPathForSystemInfo,omitempty"`
JvmOptions []string `json:"jvmOptions,omitempty" yaml:"jvmOptions,omitempty"`
LimitOneWorkerPerNode bool `json:"limitOneWorkerPerNode,omitempty" yaml:"limitOneWorkerPerNode,omitempty"`
LivenessProbe ProbeSpec `json:"livenessProbe,omitempty" yaml:"livenessProbe,omitempty"`
Expand All @@ -122,7 +123,7 @@ type PagestoreSpec struct {

type MetastoreSpec struct {
Enabled *bool `json:"enabled,omitempty" yaml:"enabled,omitempty"`
HostPath *bool `json:"hostPath,omitempty" yaml:"hostPath,omitempty"`
HostPath string `json:"hostPath,omitempty" yaml:"hostPath,omitempty"`
Size string `json:"size,omitempty" yaml:"size,omitempty"`
StorageClass string `json:"storageClass,omitempty" yaml:"storageClass,omitempty"`
Type string `json:"type,omitempty" yaml:"type,omitempty"`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4061,6 +4061,8 @@ spec:
additionalProperties:
type: string
type: object
hostPathForSystemInfo:
type: string
jvmOptions:
items:
type: string
Expand Down
2 changes: 1 addition & 1 deletion deploy/charts/alluxio/templates/worker/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ spec:
name: {{ $fullName }}-alluxio-conf
- name: {{ $alluxioWorkerSysInfoVolumeName }}
hostPath:
path: {{ $alluxioWorkerSysInfoDirPath }}
path: {{ .Values.worker.hostPathForSystemInfo }}
type: DirectoryOrCreate
{{- if .Values.hostPathForLogging }}
- name: {{ $alluxioWorkerLogVolumeName }}
Expand Down
2 changes: 2 additions & 0 deletions deploy/charts/alluxio/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ journal:
worker:
# Number of workers to launch
count: 1
# The path on the host machine for system information
hostPathForSystemInfo: /mnt/alluxio/system-info
# The path on the host machine for storing worker log
hostPathForLogs: /mnt/alluxio/logs/worker
# Whether to limit at most one Alluxio worker per k8s node.
Expand Down
2 changes: 2 additions & 0 deletions resources/crds/k8s-operator.alluxio.com_alluxioclusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4061,6 +4061,8 @@ spec:
additionalProperties:
type: string
type: object
hostPathForSystemInfo:
type: string
jvmOptions:
items:
type: string
Expand Down

0 comments on commit 7aa6a33

Please sign in to comment.