Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configurable fuse mount path #92

Merged
merged 3 commits into from
Dec 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 13 additions & 12 deletions api/v1alpha1/alluxiocluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,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 All @@ -141,17 +141,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 @@ -118,7 +118,7 @@ data:
volumes:
- name: alluxio-fuse-mount
hostPath:
path: {{ $hostMountPath }}
path: {{ .Values.fuse.hostPathForMount | dir }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need a default value for this?

Copy link
Collaborator Author

@ssz1997 ssz1997 Dec 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.Values.fuse.hostPathForMount is default to /mnt/alluxio/fuse specified in Helm chat file values.yaml

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 @@ -177,7 +177,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 @@ -299,6 +299,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