diff --git a/api/v1alpha1/alluxiocluster_types.go b/api/v1alpha1/alluxiocluster_types.go index bf46fbd3d..c5c9f248f 100644 --- a/api/v1alpha1/alluxiocluster_types.go +++ b/api/v1alpha1/alluxiocluster_types.go @@ -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"` @@ -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 { diff --git a/deploy/charts/alluxio-operator/crds/k8s-operator.alluxio.com_alluxioclusters.yaml b/deploy/charts/alluxio-operator/crds/k8s-operator.alluxio.com_alluxioclusters.yaml index 39d6390c2..46081970c 100644 --- a/deploy/charts/alluxio-operator/crds/k8s-operator.alluxio.com_alluxioclusters.yaml +++ b/deploy/charts/alluxio-operator/crds/k8s-operator.alluxio.com_alluxioclusters.yaml @@ -1007,6 +1007,8 @@ spec: type: object group: type: integer + hostPathForMount: + type: string jvmOptions: items: type: string diff --git a/deploy/charts/alluxio/templates/csi/csi-fuse.yaml b/deploy/charts/alluxio/templates/csi/csi-fuse.yaml index e4273ec14..8651d6ca1 100644 --- a/deploy/charts/alluxio/templates/csi/csi-fuse.yaml +++ b/deploy/charts/alluxio/templates/csi/csi-fuse.yaml @@ -118,7 +118,7 @@ data: volumes: - name: alluxio-fuse-mount hostPath: - path: {{ $hostMountPath }} + path: {{ .Values.fuse.hostPathForMount | dir }} type: DirectoryOrCreate - name: {{ $fullName }}-alluxio-conf configMap: diff --git a/deploy/charts/alluxio/templates/fuse/daemonset.yaml b/deploy/charts/alluxio/templates/fuse/daemonset.yaml index 5c89de4da..e7d3d42c9 100644 --- a/deploy/charts/alluxio/templates/fuse/daemonset.yaml +++ b/deploy/charts/alluxio/templates/fuse/daemonset.yaml @@ -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: diff --git a/deploy/charts/alluxio/values.yaml b/deploy/charts/alluxio/values.yaml index 25ff0f267..947614d2c 100644 --- a/deploy/charts/alluxio/values.yaml +++ b/deploy/charts/alluxio/values.yaml @@ -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 diff --git a/resources/crds/k8s-operator.alluxio.com_alluxioclusters.yaml b/resources/crds/k8s-operator.alluxio.com_alluxioclusters.yaml index 39d6390c2..46081970c 100644 --- a/resources/crds/k8s-operator.alluxio.com_alluxioclusters.yaml +++ b/resources/crds/k8s-operator.alluxio.com_alluxioclusters.yaml @@ -1007,6 +1007,8 @@ spec: type: object group: type: integer + hostPathForMount: + type: string jvmOptions: items: type: string