Skip to content

Commit

Permalink
Configurable fuse mount path (#92)
Browse files Browse the repository at this point in the history
* configurable fuse mount path on host machine

* fix metastore type typo

* mount parent path
  • Loading branch information
ssz1997 authored Dec 4, 2023
1 parent bb3c1ba commit 775456e
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 13 deletions.
23 changes: 12 additions & 11 deletions api/v1alpha1/alluxiocluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,17 +143,18 @@ type ProxySpec struct {
}

type FuseSpec struct {
Affinity corev1.Affinity `json:"affinity,omitempty" yaml:"affinity,omitempty"`
Enabled *bool `json:"enabled,omitempty" yaml:"enabled,omitempty"`
Env map[string]string `json:"env,omitempty" yaml:"env,omitempty"`
Group *int `json:"group,omitempty" yaml:"group,omitempty"`
JvmOptions []string `json:"jvmOptions,omitempty" yaml:"jvmOptions,omitempty"`
MountOptions []string `json:"mountOptions,omitempty" yaml:"mountOptions,omitempty"`
NodeSelector map[string]string `json:"nodeSelector,omitempty" yaml:"nodeSelector,omitempty"`
PodAnnotations map[string]string `json:"podAnnotations,omitempty" yaml:"podAnnotations,omitempty"`
Resources ResourcesSpec `json:"resources,omitempty" yaml:"resources,omitempty"`
Tolerations []Toleration `json:"tolerations,omitempty" yaml:"tolerations,omitempty"`
User *int `json:"user,omitempty" yaml:"user,omitempty"`
Affinity corev1.Affinity `json:"affinity,omitempty" yaml:"affinity,omitempty"`
Enabled *bool `json:"enabled,omitempty" yaml:"enabled,omitempty"`
Env map[string]string `json:"env,omitempty" yaml:"env,omitempty"`
Group *int `json:"group,omitempty" yaml:"group,omitempty"`
HostPathForMount string `json:"hostPathForMount,omitempty" yaml:"hostPathForMount,omitempty"`
JvmOptions []string `json:"jvmOptions,omitempty" yaml:"jvmOptions,omitempty"`
MountOptions []string `json:"mountOptions,omitempty" yaml:"mountOptions,omitempty"`
NodeSelector map[string]string `json:"nodeSelector,omitempty" yaml:"nodeSelector,omitempty"`
PodAnnotations map[string]string `json:"podAnnotations,omitempty" yaml:"podAnnotations,omitempty"`
Resources ResourcesSpec `json:"resources,omitempty" yaml:"resources,omitempty"`
Tolerations []Toleration `json:"tolerations,omitempty" yaml:"tolerations,omitempty"`
User *int `json:"user,omitempty" yaml:"user,omitempty"`
}

type ResourcesSpec struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1007,6 +1007,8 @@ spec:
type: object
group:
type: integer
hostPathForMount:
type: string
jvmOptions:
items:
type: string
Expand Down
2 changes: 1 addition & 1 deletion deploy/charts/alluxio/templates/csi/csi-fuse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ data:
volumes:
- name: alluxio-fuse-mount
hostPath:
path: {{ $hostMountPath }}
path: {{ .Values.fuse.hostPathForMount | dir }}
type: DirectoryOrCreate
- name: {{ $fullName }}-alluxio-conf
configMap:
Expand Down
2 changes: 1 addition & 1 deletion deploy/charts/alluxio/templates/fuse/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ spec:
volumes:
- name: alluxio-fuse-mount
hostPath:
path: {{ $hostMountPath }}
path: {{ .Values.fuse.hostPathForMount | dir }}
type: DirectoryOrCreate
- name: {{ $fullName }}-alluxio-conf
configMap:
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 @@ -307,6 +307,8 @@ proxy:
fuse:
# Whether to launch Fuse pods
enabled: false
# The path on the host machine for mount Alluxio Fuse
hostPathForMount: /mnt/alluxio/fuse
# The path on the host machine for storing fuse log
hostPathForLogs: /mnt/alluxio/logs/fuse
# User and Group that override the global value
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 @@ -1007,6 +1007,8 @@ spec:
type: object
group:
type: integer
hostPathForMount:
type: string
jvmOptions:
items:
type: string
Expand Down

0 comments on commit 775456e

Please sign in to comment.