diff --git a/Makefile b/Makefile index 9e4983f006a..de9b9248db6 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ JINDORUNTIME_CONTROLLER_IMG ?= ${IMG_REPO}/jindoruntime-controller GOOSEFSRUNTIME_CONTROLLER_IMG ?= ${IMG_REPO}/goosefsruntime-controller JUICEFSRUNTIME_CONTROLLER_IMG ?= ${IMG_REPO}/juicefsruntime-controller THINRUNTIME_CONTROLLER_IMG ?= ${IMG_REPO}/thinruntime-controller -EACRUNTIME_CONTROLLER_IMG ?= ${IMG_REPO}/eacruntime-controller +EFCRUNTIME_CONTROLLER_IMG ?= ${IMG_REPO}/efcruntime-controller CSI_IMG ?= ${IMG_REPO}/fluid-csi LOADER_IMG ?= ${IMG_REPO}/fluid-dataloader INIT_USERS_IMG ?= ${IMG_REPO}/init-users @@ -53,7 +53,7 @@ BINARY_BUILD += alluxioruntime-controller-build BINARY_BUILD += jindoruntime-controller-build BINARY_BUILD += juicefsruntime-controller-build BINARY_BUILD += thinruntime-controller-build -BINARY_BUILD += eacruntime-controller-build +BINARY_BUILD += efcruntime-controller-build BINARY_BUILD += csi-build BINARY_BUILD += webhook-build @@ -67,7 +67,7 @@ DOCKER_BUILD += docker-build-csi DOCKER_BUILD += docker-build-webhook DOCKER_BUILD += docker-build-juicefsruntime-controller DOCKER_BUILD += docker-build-thinruntime-controller -DOCKER_BUILD += docker-build-eacruntime-controller +DOCKER_BUILD += docker-build-efcruntime-controller DOCKER_BUILD += docker-build-init-users DOCKER_BUILD += docker-build-crd-upgrader @@ -81,7 +81,7 @@ DOCKER_PUSH += docker-push-webhook DOCKER_PUSH += docker-push-goosefsruntime-controller DOCKER_PUSH += docker-push-juicefsruntime-controller DOCKER_PUSH += docker-push-thinruntime-controller -DOCKER_PUSH += docker-push-eacruntime-controller +DOCKER_PUSH += docker-push-efcruntime-controller DOCKER_PUSH += docker-push-init-users DOCKER_PUSH += docker-push-crd-upgrader @@ -95,7 +95,7 @@ DOCKER_BUILDX_PUSH += docker-buildx-push-csi DOCKER_BUILDX_PUSH += docker-buildx-push-webhook DOCKER_BUILDX_PUSH += docker-buildx-push-juicefsruntime-controller DOCKER_BUILDX_PUSH += docker-buildx-push-thinruntime-controller -DOCKER_BUILDX_PUSH += docker-buildx-push-eacruntime-controller +DOCKER_BUILDX_PUSH += docker-buildx-push-efcruntime-controller DOCKER_BUILDX_PUSH += docker-buildx-push-init-users DOCKER_BUILDX_PUSH += docker-buildx-push-crd-upgrader @@ -142,8 +142,8 @@ juicefsruntime-controller-build: generate gen-openapi fmt vet thinruntime-controller-build: generate gen-openapi fmt vet CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH} GO111MODULE=${GO_MODULE} go build ${GC_FLAGS} -a -o bin/thinruntime-controller -ldflags '-s -w ${LDFLAGS}' cmd/thin/main.go -eacruntime-controller-build: generate gen-openapi fmt vet - CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH} GO111MODULE=${GO_MODULE} go build ${GC_FLAGS} -a -o bin/eacruntime-controller -ldflags '${LDFLAGS}' cmd/eac/main.go +efcruntime-controller-build: generate gen-openapi fmt vet + CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH} GO111MODULE=${GO_MODULE} go build ${GC_FLAGS} -a -o bin/efcruntime-controller -ldflags '${LDFLAGS}' cmd/efc/main.go webhook-build: generate fmt vet CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH} GO111MODULE=${GO_MODULE} go build ${GC_FLAGS} -a -o bin/fluid-webhook -ldflags '${LDFLAGS}' cmd/webhook/main.go @@ -217,8 +217,8 @@ docker-build-juicefsruntime-controller: generate gen-openapi fmt vet juicefsrunt docker-build-thinruntime-controller: generate gen-openapi fmt vet thinruntime-controller-build docker build --no-cache --build-arg TARGETARCH=${ARCH} . -f docker/Dockerfile.thinruntime -t ${THINRUNTIME_CONTROLLER_IMG}:${GIT_VERSION} -docker-build-eacruntime-controller: generate gen-openapi fmt vet - docker build --no-cache --build-arg TARGETARCH=${ARCH} . -f docker/Dockerfile.eacruntime -t ${EACRUNTIME_CONTROLLER_IMG}:${GIT_VERSION} +docker-build-efcruntime-controller: generate gen-openapi fmt vet + docker build --no-cache --build-arg TARGETARCH=${ARCH} . -f docker/Dockerfile.efcruntime -t ${EFCRUNTIME_CONTROLLER_IMG}:${GIT_VERSION} docker-build-csi: generate fmt vet docker build --no-cache . -f docker/Dockerfile.csi -t ${CSI_IMG}:${GIT_VERSION} @@ -257,8 +257,8 @@ docker-push-juicefsruntime-controller: docker-build-juicefsruntime-controller docker-push-thinruntime-controller: docker-build-thinruntime-controller docker push ${THINRUNTIME_CONTROLLER_IMG}:${GIT_VERSION} -docker-push-eacruntime-controller: docker-build-eacruntime-controller - docker push ${EACRUNTIME_CONTROLLER_IMG}:${GIT_VERSION} +docker-push-efcruntime-controller: docker-build-efcruntime-controller + docker push ${EFCRUNTIME_CONTROLLER_IMG}:${GIT_VERSION} docker-push-csi: docker-build-csi docker push ${CSI_IMG}:${GIT_VERSION} @@ -297,8 +297,8 @@ docker-buildx-push-juicefsruntime-controller: generate gen-openapi fmt vet juice docker-buildx-push-thinruntime-controller: generate gen-openapi fmt vet thinruntime-controller-build docker buildx build --push --platform linux/amd64,linux/arm64 --no-cache . -f docker/Dockerfile.thinruntime -t ${THINRUNTIME_CONTROLLER_IMG}:${GIT_VERSION} -docker-buildx-push-eacruntime-controller: generate gen-openapi fmt vet - docker buildx build --push --platform linux/amd64,linux/arm64 --no-cache . -f docker/Dockerfile.eacruntime -t ${EACRUNTIME_CONTROLLER_IMG}:${GIT_VERSION} +docker-buildx-push-efcruntime-controller: generate gen-openapi fmt vet + docker buildx build --push --platform linux/amd64,linux/arm64 --no-cache . -f docker/Dockerfile.efcruntime -t ${EFCRUNTIME_CONTROLLER_IMG}:${GIT_VERSION} docker-buildx-push-csi: generate fmt vet docker buildx build --push --platform linux/amd64,linux/arm64 --no-cache . -f docker/Dockerfile.csi -t ${CSI_IMG}:${GIT_VERSION} diff --git a/charts/eac/.helmignore b/charts/efc/.helmignore similarity index 100% rename from charts/eac/.helmignore rename to charts/efc/.helmignore diff --git a/charts/eac/CHANGELOG.md b/charts/efc/CHANGELOG.md similarity index 100% rename from charts/eac/CHANGELOG.md rename to charts/efc/CHANGELOG.md diff --git a/charts/eac/Chart.yaml b/charts/efc/Chart.yaml similarity index 95% rename from charts/eac/Chart.yaml rename to charts/efc/Chart.yaml index 608f72ad11a..0540d150ccf 100644 --- a/charts/eac/Chart.yaml +++ b/charts/efc/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v1 -name: eac +name: efc description: A fuse filesystem for NAS with distributed cache. version: 0.1.4 maintainers: diff --git a/charts/eac/README.md b/charts/efc/README.md similarity index 52% rename from charts/eac/README.md rename to charts/efc/README.md index 4fdd1d024ae..65f898b9855 100644 --- a/charts/eac/README.md +++ b/charts/efc/README.md @@ -1,2 +1,2 @@ -# EAC (Elastic Accelerate Client) -EAC 是一款由阿里云文件存储团队研发的针对 NAS 的用户态客户端,并在提供分布式缓存的同时,保证多客户端之间的缓存一致性。 \ No newline at end of file +# EFC (Elastic File Client) +EFC 是一款由阿里云文件存储团队研发的针对 NAS 的用户态客户端,并在提供分布式缓存的同时,保证多客户端之间的缓存一致性。 \ No newline at end of file diff --git a/charts/eac/templates/_helpers.tpl b/charts/efc/templates/_helpers.tpl similarity index 96% rename from charts/eac/templates/_helpers.tpl rename to charts/efc/templates/_helpers.tpl index da1b4a303c7..edb8841ce57 100644 --- a/charts/eac/templates/_helpers.tpl +++ b/charts/efc/templates/_helpers.tpl @@ -2,7 +2,7 @@ {{/* Expand the name of the chart. */}} -{{- define "eac.name" -}} +{{- define "efc.name" -}} {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} {{- end -}} @@ -11,7 +11,7 @@ Create a default fully qualified app name. We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). If release name contains chart name it will be used as a full name. */}} -{{- define "eac.fullname" -}} +{{- define "efc.fullname" -}} {{- if .Values.fullnameOverride -}} {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} {{- else -}} @@ -27,11 +27,11 @@ If release name contains chart name it will be used as a full name. {{/* Create chart name and version as used by the chart label. */}} -{{- define "eac.chart" -}} +{{- define "efc.chart" -}} {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} {{- end -}} -{{- define "eac.tieredstoreVolumeMounts" -}} +{{- define "efc.tieredstoreVolumeMounts" -}} {{- if .tieredstore.levels }} {{- range .tieredstore.levels }} {{- /* The mediumtype can have multiple parts like MEM,SSD */}} @@ -56,7 +56,7 @@ Create chart name and version as used by the chart label. {{- end}} {{- end -}} -{{- define "eac.tieredstoreVolumes" -}} +{{- define "efc.tieredstoreVolumes" -}} {{- if .tieredstore.levels }} {{- range .tieredstore.levels }} {{- if .mediumtype }} diff --git a/charts/eac/templates/fuse/daemonset.yaml b/charts/efc/templates/fuse/daemonset.yaml similarity index 88% rename from charts/eac/templates/fuse/daemonset.yaml rename to charts/efc/templates/fuse/daemonset.yaml index 15987313cb3..8639b0f10bd 100644 --- a/charts/eac/templates/fuse/daemonset.yaml +++ b/charts/efc/templates/fuse/daemonset.yaml @@ -1,10 +1,10 @@ apiVersion: apps/v1 kind: DaemonSet metadata: - name: {{ template "eac.fullname" . }}-fuse + name: {{ template "efc.fullname" . }}-fuse labels: - app: {{ template "eac.name" . }} - chart: {{ template "eac.chart" . }} + app: {{ template "efc.name" . }} + chart: {{ template "efc.chart" . }} release: {{ .Release.Name }} heritage: {{ .Release.Service }} role: eac-fuse @@ -22,8 +22,8 @@ spec: type: {{ .Values.fuse.updateStrategy.type }} selector: matchLabels: - app: {{ template "eac.name" . }} - chart: {{ template "eac.chart" . }} + app: {{ template "efc.name" . }} + chart: {{ template "efc.chart" . }} release: {{ .Release.Name }} heritage: {{ .Release.Service }} role: eac-fuse @@ -37,8 +37,8 @@ spec: {{- end }} {{- end }} labels: - app: {{ template "eac.name" . }} - chart: {{ template "eac.chart" . }} + app: {{ template "efc.name" . }} + chart: {{ template "efc.chart" . }} release: {{ .Release.Name }} heritage: {{ .Release.Service }} role: eac-fuse @@ -105,10 +105,10 @@ spec: - name: eac-fuse-mount mountPath: /eac mountPropagation: Bidirectional - - name: eac-worker-endpoints + - name: efc-worker-endpoints mountPath: /etc/eac {{- if .Values.fuse.tieredstore }} -{{- include "eac.tieredstoreVolumeMounts" .Values.fuse }} +{{- include "efc.tieredstoreVolumeMounts" .Values.fuse }} {{- end }} - name: eac-sock mountPath: /var/run/eac @@ -121,11 +121,11 @@ spec: hostPath: path: {{ .Values.fuse.hostMountPath }} type: DirectoryOrCreate - - name: eac-worker-endpoints + - name: efc-worker-endpoints configMap: - name: {{ template "eac.fullname" . }}-worker-endpoints + name: {{ template "efc.fullname" . }}-worker-endpoints {{- if .Values.fuse.tieredstore }} -{{- include "eac.tieredstoreVolumes" .Values.fuse }} +{{- include "efc.tieredstoreVolumes" .Values.fuse }} {{- end }} - name: host-os hostPath: diff --git a/charts/eac/templates/master/statefulset.yaml b/charts/efc/templates/master/statefulset.yaml similarity index 86% rename from charts/eac/templates/master/statefulset.yaml rename to charts/efc/templates/master/statefulset.yaml index 5a91fb6daa7..5d59d9266c6 100644 --- a/charts/eac/templates/master/statefulset.yaml +++ b/charts/efc/templates/master/statefulset.yaml @@ -1,11 +1,11 @@ apiVersion: apps/v1 kind: StatefulSet metadata: - name: {{ template "eac.fullname" . }}-master + name: {{ template "efc.fullname" . }}-master labels: - name: {{ template "eac.fullname" . }}-master - app: {{ template "eac.name" . }} - chart: {{ template "eac.chart" . }} + name: {{ template "efc.fullname" . }}-master + app: {{ template "efc.name" . }} + chart: {{ template "efc.chart" . }} release: {{ .Release.Name }} heritage: {{ .Release.Service }} role: eac-master @@ -21,11 +21,11 @@ metadata: spec: selector: matchLabels: - app: {{ template "eac.name" . }} + app: {{ template "efc.name" . }} role: eac-master - name: {{ template "eac.fullname" . }}-master + name: {{ template "efc.fullname" . }}-master replicas: {{ if .Values.master.enabled -}} {{ $.Values.master.count }} {{ else -}} 0 {{ end }} - serviceName: {{ template "eac.fullname" . }}-master + serviceName: {{ template "efc.fullname" . }}-master template: metadata: annotations: @@ -36,9 +36,9 @@ spec: {{- end }} {{- end }} labels: - name: {{ template "eac.fullname" . }}-master - app: {{ template "eac.name" . }} - chart: {{ template "eac.chart" . }} + name: {{ template "efc.fullname" . }}-master + app: {{ template "efc.name" . }} + chart: {{ template "efc.chart" . }} release: {{ .Release.Name }} heritage: {{ .Release.Service }} role: eac-master @@ -110,16 +110,16 @@ spec: exec: command: ["sh", "-c", "/entrypoint.sh stop_master /eac/eac-master"] volumeMounts: - - name: eac-worker-endpoints + - name: efc-worker-endpoints mountPath: /etc/eac {{- if .Values.master.tieredstore }} -{{- include "eac.tieredstoreVolumeMounts" .Values.master }} +{{- include "efc.tieredstoreVolumeMounts" .Values.master }} {{- end }} - name: localtime mountPath: /etc/localtime - name: eac-sock mountPath: /var/run/eac - - name: eac-sessmgr + - name: efc-sessmgr image: {{ .Values.master.image }}:{{ .Values.master.imageTag }} imagePullPolicy: {{ .Values.master.imagePullPolicy }} command: [ "/entrypoint.sh" ] @@ -141,11 +141,11 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} volumes: - - name: eac-worker-endpoints + - name: efc-worker-endpoints configMap: - name: {{ template "eac.fullname" . }}-worker-endpoints + name: {{ template "efc.fullname" . }}-worker-endpoints {{- if .Values.master.tieredstore }} -{{- include "eac.tieredstoreVolumes" .Values.master }} +{{- include "efc.tieredstoreVolumes" .Values.master }} {{- end }} - name: localtime hostPath: diff --git a/charts/eac/templates/worker/configmap.yaml b/charts/efc/templates/worker/configmap.yaml similarity index 73% rename from charts/eac/templates/worker/configmap.yaml rename to charts/efc/templates/worker/configmap.yaml index c2919a261f4..1b247caf4bd 100644 --- a/charts/eac/templates/worker/configmap.yaml +++ b/charts/efc/templates/worker/configmap.yaml @@ -3,13 +3,13 @@ kind: ConfigMap metadata: annotations: "helm.sh/hook": pre-install,post-delete,pre-upgrade - name: {{ template "eac.fullname" . }}-worker-endpoints + name: {{ template "efc.fullname" . }}-worker-endpoints labels: - app: {{ template "eac.name" . }} - chart: {{ template "eac.chart" . }} + app: {{ template "efc.name" . }} + chart: {{ template "efc.chart" . }} release: {{ .Release.Name }} heritage: {{ .Release.Service }} - role: eac-worker-endpoints + role: efc-worker-endpoints ownerReferences: {{- if .Values.owner.enabled }} - apiVersion: {{ .Values.owner.apiVersion }} @@ -20,5 +20,5 @@ metadata: uid: {{ .Values.owner.uid }} {{- end }} data: - eac-worker-endpoints.json: | + efc-worker-endpoints.json: | {"containerendpoints":[]} diff --git a/charts/eac/templates/worker/statefulset.yaml b/charts/efc/templates/worker/statefulset.yaml similarity index 87% rename from charts/eac/templates/worker/statefulset.yaml rename to charts/efc/templates/worker/statefulset.yaml index 2875bffcec1..cea40d8206b 100644 --- a/charts/eac/templates/worker/statefulset.yaml +++ b/charts/efc/templates/worker/statefulset.yaml @@ -1,10 +1,10 @@ apiVersion: apps/v1 kind: StatefulSet metadata: - name: {{ template "eac.fullname" . }}-worker + name: {{ template "efc.fullname" . }}-worker labels: - app: {{ template "eac.name" . }} - chart: {{ template "eac.chart" . }} + app: {{ template "efc.name" . }} + chart: {{ template "efc.chart" . }} release: {{ .Release.Name }} heritage: {{ .Release.Service }} role: eac-worker @@ -22,10 +22,10 @@ metadata: spec: podManagementPolicy: "Parallel" replicas: {{ if .Values.worker.enabled -}} {{ $.Values.worker.count }} {{ else -}} 0 {{ end }} - serviceName: {{ template "eac.fullname" . }}-worker + serviceName: {{ template "efc.fullname" . }}-worker selector: matchLabels: - app: {{ template "eac.name" . }} + app: {{ template "efc.name" . }} release: {{ .Release.Name }} role: eac-worker template: @@ -38,8 +38,8 @@ spec: {{- end }} {{- end }} labels: - app: {{ template "eac.name" . }} - chart: {{ template "eac.chart" . }} + app: {{ template "efc.name" . }} + chart: {{ template "efc.chart" . }} release: {{ .Release.Name }} heritage: {{ .Release.Service }} role: eac-worker @@ -82,7 +82,7 @@ spec: name: rpc volumeMounts: {{- if .Values.worker.tieredstore }} -{{- include "eac.tieredstoreVolumeMounts" .Values.worker }} +{{- include "efc.tieredstoreVolumeMounts" .Values.worker }} {{- end }} - name: localtime mountPath: /etc/localtime @@ -92,7 +92,7 @@ spec: {{- end }} volumes: {{- if .Values.worker.tieredstore }} -{{- include "eac.tieredstoreVolumes" .Values.worker }} +{{- include "efc.tieredstoreVolumes" .Values.worker }} {{- end }} - name: localtime hostPath: diff --git a/charts/eac/values.yaml b/charts/efc/values.yaml similarity index 87% rename from charts/eac/values.yaml rename to charts/efc/values.yaml index 1b2b4d57a68..4de66483e2c 100644 --- a/charts/eac/values.yaml +++ b/charts/efc/values.yaml @@ -1,4 +1,4 @@ -# Default values for eac. +# Default values for efc. # This is a YAML-formatted file. # Declare variables to be passed into your templates. @@ -51,10 +51,10 @@ fuse: image: image-work-in-progress imageTag: update imagePullPolicy: Always - option: g_tier_EnableClusterCache=true,g_unas_InodeAttrExpireTimeoutSec=100,g_unas_InodeEntryExpireTimeoutSec=100,assign_uuid=test-eac-helm-fuse - mountPoint: eac://nas-mount-point - # eac will mount mountPoint on /eac/eac-fuse in container which will be shared at hostMountPath/eac-fuse on host - hostMountPath: /test-mnt/eac-mnt/charts + option: g_tier_EnableClusterCache=true,g_unas_InodeAttrExpireTimeoutSec=100,g_unas_InodeEntryExpireTimeoutSec=100,assign_uuid=test-efc-helm-fuse + mountPoint: efc://nas-mount-point + # efc will mount mountPoint on /efc/efc-fuse in container which will be shared at hostMountPath/efc-fuse on host + hostMountPath: /test-mnt/efc-mnt/charts tieredstore: levels: - level: 0 @@ -82,8 +82,8 @@ master: image: image-work-in-progress imageTag: update imagePullPolicy: Always - option: g_tier_EnableClusterCache=true,g_unas_InodeAttrExpireTimeoutSec=100,g_unas_InodeEntryExpireTimeoutSec=100,assign_uuid=test-eac-helm-master - mountPoint: eac://nas-mount-point + option: g_tier_EnableClusterCache=true,g_unas_InodeAttrExpireTimeoutSec=100,g_unas_InodeEntryExpireTimeoutSec=100,assign_uuid=test-efc-helm-master + mountPoint: efc://nas-mount-point tieredstore: levels: - level: 0 diff --git a/charts/fluid/fluid/templates/controller/eacruntime_controller.yaml b/charts/fluid/fluid/templates/controller/efcruntime_controller.yaml similarity index 63% rename from charts/fluid/fluid/templates/controller/eacruntime_controller.yaml rename to charts/fluid/fluid/templates/controller/efcruntime_controller.yaml index 2c4c3438030..987d15aa00c 100644 --- a/charts/fluid/fluid/templates/controller/eacruntime_controller.yaml +++ b/charts/fluid/fluid/templates/controller/efcruntime_controller.yaml @@ -2,33 +2,33 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: eacruntime-controller + name: efcruntime-controller namespace: {{ include "fluid.namespace" . }} labels: - control-plane: eacruntime-controller + control-plane: efcruntime-controller spec: selector: matchLabels: - control-plane: eacruntime-controller - {{ if .Values.runtime.eac.enabled -}} - replicas: {{ .Values.runtime.eac.replicas }} + control-plane: efcruntime-controller + {{ if .Values.runtime.efc.enabled -}} + replicas: {{ .Values.runtime.efc.replicas }} {{- else }} replicas: 0 {{- end }} template: metadata: labels: - control-plane: eacruntime-controller + control-plane: efcruntime-controller annotations: - {{ if gt (.Values.runtime.eac.replicas | int ) 1 -}} - controller.runtime.fluid.io/replicas: {{ .Values.runtime.eac.replicas | quote }} + {{ if gt (.Values.runtime.efc.replicas | int ) 1 -}} + controller.runtime.fluid.io/replicas: {{ .Values.runtime.efc.replicas | quote }} {{- end }} spec: {{- with .Values.image.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} - serviceAccountName: eacruntime-controller + serviceAccountName: efcruntime-controller affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: @@ -42,15 +42,15 @@ spec: - operator: Exists #hostNetwork: true containers: - - image: "{{ .Values.runtime.eac.controller.image }}" - imagePullPolicy: {{ .Values.runtime.eac.controller.imagePullPolicy }} + - image: "{{ .Values.runtime.efc.controller.image }}" + imagePullPolicy: {{ .Values.runtime.efc.controller.imagePullPolicy }} name: manager args: - --development=true - --pprof-addr=:6060 - --enable-leader-election - --leader-election-namespace={{ include "fluid.namespace" . }} - command: ["eacruntime-controller", "start"] + command: ["efcruntime-controller", "start"] env: {{- if .Values.runtime.mountRoot }} - name: MOUNT_ROOT @@ -64,21 +64,21 @@ spec: - name: FLUID_SYNC_RETRY_DURATION value: {{ .Values.runtime.syncRetryDuration | quote }} {{- end }} - {{- if .Values.runtime.eac.init.image }} - - name: EAC_INIT_FUSE_IMAGE_ENV - value: {{ .Values.runtime.eac.init.image | quote }} + {{- if .Values.runtime.efc.init.image }} + - name: EFC_INIT_FUSE_IMAGE_ENV + value: {{ .Values.runtime.efc.init.image | quote }} {{- end }} - {{- if .Values.runtime.eac.master.image }} - - name: EAC_MASTER_IMAGE_ENV - value: {{ .Values.runtime.eac.master.image | quote }} + {{- if .Values.runtime.efc.master.image }} + - name: EFC_MASTER_IMAGE_ENV + value: {{ .Values.runtime.efc.master.image | quote }} {{- end }} - {{- if .Values.runtime.eac.worker.image }} - - name: EAC_WORKER_IMAGE_ENV - value: {{ .Values.runtime.eac.worker.image | quote }} + {{- if .Values.runtime.efc.worker.image }} + - name: EFC_WORKER_IMAGE_ENV + value: {{ .Values.runtime.efc.worker.image | quote }} {{- end }} - {{- if .Values.runtime.eac.fuse.image }} - - name: EAC_FUSE_IMAGE_ENV - value: {{ .Values.runtime.eac.fuse.image | quote }} + {{- if .Values.runtime.efc.fuse.image }} + - name: EFC_FUSE_IMAGE_ENV + value: {{ .Values.runtime.efc.fuse.image | quote }} {{- end }} ports: - containerPort: 8080 diff --git a/charts/fluid/fluid/templates/role/eac/rbac.yaml b/charts/fluid/fluid/templates/role/efc/rbac.yaml similarity index 92% rename from charts/fluid/fluid/templates/role/eac/rbac.yaml rename to charts/fluid/fluid/templates/role/efc/rbac.yaml index 7cdb13e7e9f..4e794828962 100644 --- a/charts/fluid/fluid/templates/role/eac/rbac.yaml +++ b/charts/fluid/fluid/templates/role/efc/rbac.yaml @@ -2,7 +2,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - name: eacruntime-controller + name: efcruntime-controller rules: - apiGroups: - "" @@ -124,18 +124,18 @@ rules: apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: - name: eacruntime-clusterrolebinding + name: efcruntime-clusterrolebinding roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole - name: eacruntime-controller + name: efcruntime-controller subjects: - kind: ServiceAccount - name: eacruntime-controller + name: efcruntime-controller namespace: {{ include "fluid.namespace" . }} --- apiVersion: v1 kind: ServiceAccount metadata: - name: eacruntime-controller + name: efcruntime-controller namespace: {{ include "fluid.namespace" . }} diff --git a/charts/fluid/fluid/values.yaml b/charts/fluid/fluid/values.yaml index c649c67ab4d..d19160a4c6f 100644 --- a/charts/fluid/fluid/values.yaml +++ b/charts/fluid/fluid/values.yaml @@ -91,11 +91,11 @@ runtime: enabled: false controller: image: fluidcloudnative/thinruntime-controller:v0.9.0-51b8c38 - eac: + efc: replicas: 1 enabled: false controller: - image: fluidcloudnative/eacruntime-controller:v0.9.0-51b8c38 + image: fluidcloudnative/efcruntime-controller:v0.9.0-51b8c38 imagePullPolicy: Always init: image: registry.cn-zhangjiakou.aliyuncs.com/nascache/init-alifuse:v0.1.0-196d2b1 diff --git a/cmd/eac/app/eac.go b/cmd/efc/app/efc.go similarity index 94% rename from cmd/eac/app/eac.go rename to cmd/efc/app/efc.go index 551e130c3dc..d72d0b82f98 100644 --- a/cmd/eac/app/eac.go +++ b/cmd/efc/app/efc.go @@ -57,7 +57,7 @@ var ( var startCmd = &cobra.Command{ Use: "start", - Short: "start eacruntime-controller in Kubernetes", + Short: "start efcruntime-controller in Kubernetes", Run: func(cmd *cobra.Command, args []string) { handle() }, @@ -99,11 +99,11 @@ func handle() { MetricsBindAddress: metricsAddr, LeaderElection: enableLeaderElection, LeaderElectionNamespace: leaderElectionNamespace, - LeaderElectionID: "eac.data.fluid.io", + LeaderElectionID: "efc.data.fluid.io", Port: 9443, }) if err != nil { - setupLog.Error(err, "unable to start eacruntime manager") + setupLog.Error(err, "unable to start efcruntime manager") os.Exit(1) } @@ -138,9 +138,9 @@ func handle() { os.Exit(1) } - setupLog.Info("starting eacruntime-controller") + setupLog.Info("starting efcruntime-controller") if err := mgr.Start(ctrl.SetupSignalHandler()); err != nil { - setupLog.Error(err, "problem eacruntime-controller") + setupLog.Error(err, "problem efcruntime-controller") os.Exit(1) } } diff --git a/cmd/eac/app/init.go b/cmd/efc/app/init.go similarity index 85% rename from cmd/eac/app/init.go rename to cmd/efc/app/init.go index d83c115ce90..c6e0e47076b 100644 --- a/cmd/eac/app/init.go +++ b/cmd/efc/app/init.go @@ -18,10 +18,10 @@ package app import "github.com/spf13/cobra" -func NewEACControllerCommand() *cobra.Command { +func NewEFCControllerCommand() *cobra.Command { cmd := &cobra.Command{ - Use: "eacruntime-controller", - Short: "Controller for eacruntime", + Use: "efcruntime-controller", + Short: "Controller for efcruntime", } cmd.AddCommand(startCmd) cmd.AddCommand(versionCmd) diff --git a/cmd/eac/app/version.go b/cmd/efc/app/version.go similarity index 100% rename from cmd/eac/app/version.go rename to cmd/efc/app/version.go diff --git a/cmd/eac/main.go b/cmd/efc/main.go similarity index 89% rename from cmd/eac/main.go rename to cmd/efc/main.go index 467529a88d0..0fd26441479 100644 --- a/cmd/eac/main.go +++ b/cmd/efc/main.go @@ -20,11 +20,11 @@ import ( "fmt" "os" - "github.com/fluid-cloudnative/fluid/cmd/eac/app" + "github.com/fluid-cloudnative/fluid/cmd/efc/app" ) func main() { - cmd := app.NewEACControllerCommand() + cmd := app.NewEFCControllerCommand() if err := cmd.Execute(); err != nil { fmt.Fprintf(os.Stderr, "%s", err.Error()) os.Exit(1) diff --git a/docker/Dockerfile.eacruntime b/docker/Dockerfile.efcruntime similarity index 78% rename from docker/Dockerfile.eacruntime rename to docker/Dockerfile.efcruntime index c48fd665a09..a52cfb53b45 100644 --- a/docker/Dockerfile.eacruntime +++ b/docker/Dockerfile.efcruntime @@ -1,11 +1,11 @@ -# Build the eacruntime-controller manager binary +# Build the efcruntime-controller manager binary FROM golang:1.18 AS builder WORKDIR /go/src/github.com/fluid-cloudnative/fluid COPY . . -RUN make eacruntime-controller-build && \ - cp bin/eacruntime-controller /go/bin/eacruntime-controller +RUN make efcruntime-controller-build && \ + cp bin/efcruntime-controller /go/bin/efcruntime-controller # Debug RUN go install github.com/go-delve/delve/cmd/dlv@v1.8.2 @@ -28,8 +28,8 @@ RUN curl -o /usr/local/bin/kubectl https://storage.googleapis.com/kubernetes-rel ADD charts/ /charts -COPY --from=builder /go/bin/eacruntime-controller /usr/local/bin/eacruntime-controller +COPY --from=builder /go/bin/efcruntime-controller /usr/local/bin/efcruntime-controller COPY --from=builder /go/bin/dlv /usr/local/bin/dlv RUN chmod -R u+x /usr/local/bin/ -CMD ["eacruntime-controller", "start"] +CMD ["efcruntime-controller", "start"] diff --git a/docs/zh/samples/eac_runtime.md b/docs/zh/samples/efc_runtime.md similarity index 97% rename from docs/zh/samples/eac_runtime.md rename to docs/zh/samples/efc_runtime.md index 5dd3a2e233c..07501232682 100644 --- a/docs/zh/samples/eac_runtime.md +++ b/docs/zh/samples/efc_runtime.md @@ -10,7 +10,7 @@ EFC 是一款针对分布式文件系统 NAS 的用户态客户端,并在提 您可以从 [Fluid Releases](https://github.com/fluid-cloudnative/fluid/releases) 下载最新的 Fluid 安装包。 -在 Fluid 的安装 chart values.yaml 中将 `runtime.eac.enable` 设置为 `true` ,再参考 [安装文档](../userguide/install.md) 完成安装。并检查Fluid各组件正常运行: +在 Fluid 的安装 chart values.yaml 中将 `runtime.efc.enable` 设置为 `true` ,再参考 [安装文档](../userguide/install.md) 完成安装。并检查Fluid各组件正常运行: ```shell $ kubectl get po -n fluid-system @@ -19,12 +19,12 @@ csi-nodeplugin-fluid-4m2rq 2/2 Running 0 81s csi-nodeplugin-fluid-8l6nr 2/2 Running 0 81s csi-nodeplugin-fluid-t7hl2 2/2 Running 0 81s dataset-controller-99bc4dcc8-sl6h7 1/1 Running 0 81s -eacruntime-controller-6fd48c77fc-k2hhr 1/1 Running 0 81s +efcruntime-controller-6fd48c77fc-k2hhr 1/1 Running 0 81s fluid-webhook-d8c4dcc7-whq5k 1/1 Running 0 81s fluidapp-controller-78c7ccd7fd-blw6w 1/1 Running 0 81s ``` -确保 `eacruntime-controller`、`dataset-controller`、`fluid-webhook` 的 pod 以及若干 `csi-nodeplugin` pod 正常运行。 +确保 `efcruntime-controller`、`dataset-controller`、`fluid-webhook` 的 pod 以及若干 `csi-nodeplugin` pod 正常运行。 ## 新建工作环境 @@ -47,13 +47,13 @@ metadata: name: mydemo spec: mounts: - - mountPoint: "eac://nas-mount-point-address:/sub/path" + - mountPoint: "efc://nas-mount-point-address:/sub/path" EOF ``` 其中: -- `mountPoint`:指的是 EFC 的子目录,是用户在 NAS 文件系统中存储数据的目录,以 `eac://` 开头;如 `eac://nas-mount-point-address:/sub/path` 为 `nas-mount-point-address` 文件系统的 `/sub/path` 子目录。 +- `mountPoint`:指的是 EFC 的子目录,是用户在 NAS 文件系统中存储数据的目录,以 `efc://` 开头;如 `efc://nas-mount-point-address:/sub/path` 为 `nas-mount-point-address` 文件系统的 `/sub/path` 子目录。 **创建 `Dataset` 资源对象** ```shell diff --git a/docs/zh/troubleshooting/debug-fuse.md b/docs/zh/troubleshooting/debug-fuse.md index 474ed2ce5a9..34d2c1a2ae5 100644 --- a/docs/zh/troubleshooting/debug-fuse.md +++ b/docs/zh/troubleshooting/debug-fuse.md @@ -57,8 +57,8 @@ I0210 17:50:36.916699 5193 utils.go:97] GRPC call: /csi.v1.Node/NodeStageVolu I0210 17:50:36.916709 5193 utils.go:98] GRPC request: {"staging_target_path":"/var/lib/kubelet/plugins/kubernetes.io/csi/f use.csi.fluid.io/dfed9324cd62d4e5384eff9613dd92ef318504fcada75b371ce827a0cba19f46/globalmount","volume_capability":{"AccessTy pe":{"Mount":{}},"access_mode":{"mode":3}},"volume_context":{"fluid_path":"/runtime-mnt/eac/default/eac-demo/eac-fuse","mount -_type":"alifuse.aliyun-alinas-eac","runtime_name":"eac-demo","runtime_namespace":"default"},"volume_id":"default-eac-demo"} -I0210 17:50:36.916793 5193 nodeserver.go:270] NodeStageVolume: Starting NodeStage with VolumeId: default-eac-demo, and Vol +_type":"alifuse.aliyun-alinas-eac","runtime_name":"eac-demo","runtime_namespace":"default"},"volume_id":"default-efc-demo"} +I0210 17:50:36.916793 5193 nodeserver.go:270] NodeStageVolume: Starting NodeStage with VolumeId: default-efc-demo, and Vol umeContext: map[fluid_path:/runtime-mnt/eac/default/eac-demo/eac-fuse mount_type:alifuse.aliyun-alinas-eac runtime_name:eac-d emo runtime_namespace:default] ``` diff --git a/pkg/common/eac.go b/pkg/common/eac.go deleted file mode 100644 index 89ed0f08975..00000000000 --- a/pkg/common/eac.go +++ /dev/null @@ -1,64 +0,0 @@ -/* - Copyright 2022 The Fluid Authors. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -package common - -// Runtime for EAC -const ( - EACRuntimeType = "eac" - EACRuntimeResourceFinalizerName = "eac-runtime-controller-finalizer" - EACRuntimeControllerName = "EACRuntimeController" - - EACRuntime = EACRuntimeType - - EACChart = EACRuntime - - EACMountType = "alifuse.aliyun-alinas-eac" - - EACMasterImageEnv = "EAC_MASTER_IMAGE_ENV" - - EACFuseImageEnv = "EAC_FUSE_IMAGE_ENV" - - EACWorkerImageEnv = "EAC_WORKER_IMAGE_ENV" - - EACInitFuseImageEnv = "EAC_INIT_FUSE_IMAGE_ENV" - - DefaultEACMasterImage = "registry.cn-zhangjiakou.aliyuncs.com/nasteam/eac-fluid-img:update" - - DefaultEACFuseImage = "registry.cn-zhangjiakou.aliyuncs.com/nasteam/eac-fluid-img:update" - - DefaultEACWorkerImage = "registry.cn-zhangjiakou.aliyuncs.com/nasteam/eac-worker-img:update" - - DefaultEACInitFuseImage = "registry.cn-zhangjiakou.aliyuncs.com/nasteam/init-alifuse:update" -) - -// Constants for EAC SessMgr -const ( - SessMgrNamespace = "eac-system" - SessMgrDaemonSetName = "eac-sessmgr" - - SessMgrNodeSelectorKey = "fluid.io/eac-sessmgr" - - EACSessMgrImageEnv = "EAC_SESSMGR_IMAGE_ENV" - - EACSessMgrUpdateStrategyEnv = "EAC_SESSMGR_UPDATE_STRATEGY_ENV" - - DefaultEACSessMgrImage = "registry.cn-zhangjiakou.aliyuncs.com/nascache/eac-fuse:v0.1.0-196d2b1" - - SessMgrSockFile = "sessmgrd.sock" - - VolumeAttrEACSessMgrWorkDir = "eac_sessmgr_workdir" -) diff --git a/pkg/common/efc.go b/pkg/common/efc.go new file mode 100644 index 00000000000..30b4a8afa8e --- /dev/null +++ b/pkg/common/efc.go @@ -0,0 +1,65 @@ +/* + Copyright 2022 The Fluid Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package common + +// Runtime for EFC +const ( + EFCRuntime = "efc" + + EFCChart = EFCRuntime + + EFCMountType = "alifuse.aliyun-alinas-eac" + + EFCRuntimeResourceFinalizerName = "efc-runtime-controller-finalizer" + + EFCRuntimeControllerName = "EFCRuntimeController" + + EFCMasterImageEnv = "EFC_MASTER_IMAGE_ENV" + + EFCFuseImageEnv = "EFC_FUSE_IMAGE_ENV" + + EFCWorkerImageEnv = "EFC_WORKER_IMAGE_ENV" + + EFCInitFuseImageEnv = "EFC_INIT_FUSE_IMAGE_ENV" + + DefaultEFCMasterImage = "registry.cn-zhangjiakou.aliyuncs.com/nascache/eac-master:update" + + DefaultEFCFuseImage = "registry.cn-zhangjiakou.aliyuncs.com/nascache/eac-fuse:update" + + DefaultEFCWorkerImage = "registry.cn-zhangjiakou.aliyuncs.com/nascache/eac-worker:update" + + DefaultEFCInitFuseImage = "registry.cn-zhangjiakou.aliyuncs.com/nascache/init-alifuse:update" +) + +// Constants for EFC SessMgr +const ( + SessMgrNamespace = "efc-system" + + SessMgrDaemonSetName = "efc-sessmgr" + + SessMgrNodeSelectorKey = "fluid.io/efc-sessmgr" + + EFCSessMgrImageEnv = "EFC_SESSMGR_IMAGE_ENV" + + EFCSessMgrUpdateStrategyEnv = "EFC_SESSMGR_UPDATE_STRATEGY_ENV" + + DefaultEFCSessMgrImage = "registry.cn-zhangjiakou.aliyuncs.com/nascache/eac-fuse:update" + + SessMgrSockFile = "sessmgrd.sock" + + VolumeAttrEFCSessMgrWorkDir = "efc_sessmgr_workdir" +) diff --git a/pkg/controllers/v1alpha1/eac/eacruntime_controller.go b/pkg/controllers/v1alpha1/eac/eacruntime_controller.go index 99f446240f9..329c3772cb3 100644 --- a/pkg/controllers/v1alpha1/eac/eacruntime_controller.go +++ b/pkg/controllers/v1alpha1/eac/eacruntime_controller.go @@ -62,7 +62,7 @@ func NewRuntimeReconciler(client client.Client, return r } -//Reconcile reconciles eac runtime +//Reconcile reconciles efc runtime // +kubebuilder:rbac:groups=data.fluid.io,resources=efcruntimes,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups=data.fluid.io,resources=efcruntimes/status,verbs=get;update;patch @@ -70,13 +70,13 @@ func (r *RuntimeReconciler) Reconcile(context context.Context, req ctrl.Request) defer utils.TimeTrack(time.Now(), "Reconcile EFCRuntime", "request", req) ctx := cruntime.ReconcileRequestContext{ Context: context, - Log: r.Log.WithValues("eacruntime", req.NamespacedName), + Log: r.Log.WithValues("efcruntime", req.NamespacedName), NamespacedName: req.NamespacedName, Recorder: r.Recorder, Category: common.AccelerateCategory, - RuntimeType: common.EACRuntimeType, + RuntimeType: common.EFCRuntime, Client: r.Client, - FinalizerName: common.EACRuntimeResourceFinalizerName, + FinalizerName: common.EFCRuntimeResourceFinalizerName, } ctx.Log.V(1).Info("process the request", "request", req) @@ -112,7 +112,7 @@ func (r *RuntimeReconciler) SetupWithManager(mgr ctrl.Manager, options controlle } func (r *RuntimeReconciler) ControllerName() string { - return common.EACRuntimeControllerName + return common.EFCRuntimeControllerName } func (r *RuntimeReconciler) ManagedResource() client.Object { diff --git a/pkg/controllers/v1alpha1/thinruntime/thinruntime_controller.go b/pkg/controllers/v1alpha1/thinruntime/thinruntime_controller.go index dbb0492e604..e6b04063063 100644 --- a/pkg/controllers/v1alpha1/thinruntime/thinruntime_controller.go +++ b/pkg/controllers/v1alpha1/thinruntime/thinruntime_controller.go @@ -142,7 +142,7 @@ func NewCache(scheme *runtime.Scheme) cache.NewCacheFunc { common.JindoRuntime, common.JuiceFSRuntime, common.GooseFSRuntime, - common.EACRuntime, + common.EFCRuntime, }) if err != nil { panic(err) diff --git a/pkg/csi/plugins/nodeserver.go b/pkg/csi/plugins/nodeserver.go index 7954657f1f8..fa5e94d7045 100644 --- a/pkg/csi/plugins/nodeserver.go +++ b/pkg/csi/plugins/nodeserver.go @@ -283,7 +283,7 @@ func (ns *nodeServer) NodeStageVolume(ctx context.Context, req *csi.NodeStageVol glog.Infof("NodeStageVolume: Starting NodeStage with VolumeId: %s, and VolumeContext: %v", req.GetVolumeId(), req.VolumeContext) // 1. Start SessMgr Pod and wait for ready if FUSE pod requires SessMgr - sessMgrWorkDir := req.GetVolumeContext()[common.VolumeAttrEACSessMgrWorkDir] + sessMgrWorkDir := req.GetVolumeContext()[common.VolumeAttrEFCSessMgrWorkDir] if len(sessMgrWorkDir) != 0 { if err := ns.prepareSessMgr(sessMgrWorkDir); err != nil { glog.Errorf("NodeStageVolume: fail to prepare SessMgr because: %v", err) diff --git a/pkg/ctrl/affinity.go b/pkg/ctrl/affinity.go index c2a75876478..d3f3dd27bd6 100644 --- a/pkg/ctrl/affinity.go +++ b/pkg/ctrl/affinity.go @@ -130,7 +130,7 @@ func (e *Helper) BuildWorkersAffinity(workers *appsv1.StatefulSet) (workersToUpd // TODO: remove this when EAC is ready for spread-first scheduling policy // Currently EAC prefers binpack-first scheduling policy to spread-first scheduling policy. Set PreferredDuringSchedulingIgnoredDuringExecution to empty // to avoid using spread-first scheduling policy - if e.runtimeInfo.GetRuntimeType() == common.EACRuntime { + if e.runtimeInfo.GetRuntimeType() == common.EFCRuntime { workersToUpdate.Spec.Template.Spec.Affinity.PodAntiAffinity.PreferredDuringSchedulingIgnoredDuringExecution = []corev1.WeightedPodAffinityTerm{} } } diff --git a/pkg/ctrl/affinity_test.go b/pkg/ctrl/affinity_test.go index a6d62ae9861..4c592eb98ee 100644 --- a/pkg/ctrl/affinity_test.go +++ b/pkg/ctrl/affinity_test.go @@ -303,7 +303,7 @@ func TestBuildWorkersAffinityForEACRuntime(t *testing.T) { }, worker: &appsv1.StatefulSet{ ObjectMeta: metav1.ObjectMeta{ - Name: "test-eac-worker", + Name: "test-efc-worker", Namespace: "big-data", }, Spec: appsv1.StatefulSetSpec{ @@ -359,7 +359,7 @@ func TestBuildWorkersAffinityForEACRuntime(t *testing.T) { runtimeObjs = append(runtimeObjs, tt.dataset) runtimeObjs = append(runtimeObjs, tt.worker) mockClient := fake.NewFakeClientWithScheme(s, runtimeObjs...) - runtimeInfo, err := base.BuildRuntimeInfo(tt.dataset.Name, tt.dataset.Namespace, common.EACRuntime, datav1alpha1.TieredStore{}) + runtimeInfo, err := base.BuildRuntimeInfo(tt.dataset.Name, tt.dataset.Namespace, common.EFCRuntime, datav1alpha1.TieredStore{}) if err != nil { t.Fatalf("testcase %s failed due to %v", tt.name, err) } diff --git a/pkg/ddc/base/runtime.go b/pkg/ddc/base/runtime.go index 6c345794972..db2054a94a1 100644 --- a/pkg/ddc/base/runtime.go +++ b/pkg/ddc/base/runtime.go @@ -392,12 +392,12 @@ func GetRuntimeInfo(client client.Client, name, namespace string) (runtimeInfo R // Fuse global is always set to true runtimeInfo.SetupFuseDeployMode(true, thinRuntime.Spec.Fuse.NodeSelector) runtimeInfo.SetupFuseCleanPolicy(thinRuntime.Spec.Fuse.CleanPolicy) - case common.EACRuntime: + case common.EFCRuntime: eacRuntime, err := utils.GetEFCRuntime(client, name, namespace) if err != nil { return runtimeInfo, err } - runtimeInfo, err = BuildRuntimeInfo(name, namespace, common.EACRuntime, datav1alpha1.TieredStore{}, WithMetadataList(eacRuntime.Spec.MetadataList)) + runtimeInfo, err = BuildRuntimeInfo(name, namespace, common.EFCRuntime, datav1alpha1.TieredStore{}, WithMetadataList(eacRuntime.Spec.MetadataList)) if err != nil { return runtimeInfo, err } @@ -440,7 +440,7 @@ func GetRuntimeStatus(client client.Client, runtimeType, name, namespace string) return status, err } return &runtime.Status, nil - case common.EACRuntime: + case common.EFCRuntime: runtime, err := utils.GetEFCRuntime(client, name, namespace) if err != nil { return status, err @@ -472,7 +472,7 @@ func GetRuntimeAndType(client client.Client, boundedRuntime *datav1alpha1.Runtim runtime, err = utils.GetGooseFSRuntime(client, boundedRuntime.Name, boundedRuntime.Namespace) case common.JuiceFSRuntime: runtime, err = utils.GetJuiceFSRuntime(client, boundedRuntime.Name, boundedRuntime.Namespace) - case common.EACRuntime: + case common.EFCRuntime: runtime, err = utils.GetEFCRuntime(client, boundedRuntime.Name, boundedRuntime.Namespace) case common.ThinRuntime: runtime, err = utils.GetThinRuntime(client, boundedRuntime.Name, boundedRuntime.Namespace) diff --git a/pkg/ddc/base/runtime_test.go b/pkg/ddc/base/runtime_test.go index 77ddc9c51c2..bc087c56472 100644 --- a/pkg/ddc/base/runtime_test.go +++ b/pkg/ddc/base/runtime_test.go @@ -927,21 +927,21 @@ func TestGetRuntimeInfo(t *testing.T) { eacRuntime := v1alpha1.EFCRuntime{ ObjectMeta: metav1.ObjectMeta{ - Name: "eac", + Name: "efc", Namespace: "default", }, } dataEAC := v1alpha1.Dataset{ ObjectMeta: metav1.ObjectMeta{ - Name: "eac", + Name: "efc", Namespace: "default", }, Status: v1alpha1.DatasetStatus{ Runtimes: []v1alpha1.Runtime{ { - Name: "eac", + Name: "efc", Namespace: "default", - Type: common.EACRuntime, + Type: common.EFCRuntime, }, }, }, @@ -1093,13 +1093,13 @@ func TestGetRuntimeInfo(t *testing.T) { name: "eac_test", args: args{ client: fakeutils.NewFakeClientWithScheme(s, eacRuntimeObjs...), - name: "eac", + name: "efc", namespace: "default", }, want: &RuntimeInfo{ - name: "eac", + name: "efc", namespace: "default", - runtimeType: common.EACRuntime, + runtimeType: common.EFCRuntime, // fuse global is set to true since v0.7.0 fuse: Fuse{ Global: true, @@ -1118,7 +1118,7 @@ func TestGetRuntimeInfo(t *testing.T) { want: &RuntimeInfo{ name: "eac-fake", namespace: "default", - runtimeType: common.EACRuntime, + runtimeType: common.EFCRuntime, // fuse global is set to true since v0.7.0 fuse: Fuse{ Global: true, @@ -1183,7 +1183,7 @@ func TestGetRuntimeStatus(t *testing.T) { eacRuntime := v1alpha1.EFCRuntime{ ObjectMeta: metav1.ObjectMeta{ - Name: "eac", + Name: "efc", Namespace: "default", }, } @@ -1312,9 +1312,9 @@ func TestGetRuntimeStatus(t *testing.T) { name: "eac_test", args: args{ client: fakeutils.NewFakeClientWithScheme(s, eacRuntimeObjs...), - name: "eac", + name: "efc", namespace: "default", - runtimeType: common.EACRuntime, + runtimeType: common.EFCRuntime, }, wantErr: false, }, @@ -1324,7 +1324,7 @@ func TestGetRuntimeStatus(t *testing.T) { client: fakeutils.NewFakeClientWithScheme(s, eacRuntimeObjs...), name: "eac-error", namespace: "default", - runtimeType: common.EACRuntime, + runtimeType: common.EFCRuntime, }, wantErr: true, }, diff --git a/pkg/ddc/eac/const.go b/pkg/ddc/eac/const.go index c19fdd9fcac..44e961de331 100644 --- a/pkg/ddc/eac/const.go +++ b/pkg/ddc/eac/const.go @@ -26,7 +26,7 @@ const ( AccessKeyIDName = "eac.nas.accessKeyId" AccessKeySecretName = "eac.nas.accessKeySecret" - WorkerEndpointsDataName = "eac-worker-endpoints.json" + WorkerEndpointsDataName = "efc-worker-endpoints.json" - MountPointPrefix = "eac://" + MountPointPrefix = "efc://" ) diff --git a/pkg/ddc/eac/create_volume.go b/pkg/ddc/eac/create_volume.go index 2efd3691723..4fc16d70763 100644 --- a/pkg/ddc/eac/create_volume.go +++ b/pkg/ddc/eac/create_volume.go @@ -64,7 +64,7 @@ func (e *EACEngine) createFusePersistentVolume() (err error) { // e.g. /runtime-mnt/eac-sock sessMgrWorkDir := filepath.Join(mountRoot, "eac-sock") - return e.createPersistentVolumeForRuntime(runtimeInfo, e.getMountPath(), common.EACMountType, sessMgrWorkDir) + return e.createPersistentVolumeForRuntime(runtimeInfo, e.getMountPath(), common.EFCMountType, sessMgrWorkDir) } // createFusePersistentVolume @@ -115,7 +115,7 @@ func (e *EACEngine) createPersistentVolumeForRuntime(runtime base.RuntimeInfoInt common.VolumeAttrMountType: mountType, common.VolumeAttrNamespace: runtime.GetNamespace(), common.VolumeAttrName: runtime.GetName(), - common.VolumeAttrEACSessMgrWorkDir: sessMgrWorkDir, + common.VolumeAttrEFCSessMgrWorkDir: sessMgrWorkDir, }, }, }, diff --git a/pkg/ddc/eac/data_load.go b/pkg/ddc/eac/data_load.go index 5fff73e29f8..35a01296376 100644 --- a/pkg/ddc/eac/data_load.go +++ b/pkg/ddc/eac/data_load.go @@ -52,7 +52,7 @@ func (e *EACEngine) CreateDataLoadJob(ctx cruntime.ReconcileRequestContext, targ log.Error(err, "failed to generate dataload chart's value file") return err } - chartName := utils.GetChartsDirectory() + "/" + cdataload.DataloadChart + "/" + common.EACRuntime + chartName := utils.GetChartsDirectory() + "/" + cdataload.DataloadChart + "/" + common.EFCRuntime err = helm.InstallRelease(releaseName, targetDataload.Namespace, valueFileName, chartName) if err != nil { log.Error(err, "failed to install dataload chart") diff --git a/pkg/ddc/eac/data_load_test.go b/pkg/ddc/eac/data_load_test.go index 5281ece9302..204a15a1f96 100644 --- a/pkg/ddc/eac/data_load_test.go +++ b/pkg/ddc/eac/data_load_test.go @@ -37,7 +37,7 @@ import ( func TestEACEngine_CreateDataLoadJob(t *testing.T) { configMap := &v1.ConfigMap{ ObjectMeta: metav1.ObjectMeta{ - Name: "eacdemo-eac-values", + Name: "efcdemo-efc-values", Namespace: "fluid", }, Data: map[string]string{ @@ -73,12 +73,12 @@ func TestEACEngine_CreateDataLoadJob(t *testing.T) { targetDataLoad := datav1alpha1.DataLoad{ ObjectMeta: metav1.ObjectMeta{ - Name: "eacdemo-dataload", + Name: "efcdemo-dataload", Namespace: "fluid", }, Spec: datav1alpha1.DataLoadSpec{ Dataset: datav1alpha1.TargetDataset{ - Name: "eacdemo", + Name: "efcdemo", Namespace: "fluid", }, }, @@ -86,7 +86,7 @@ func TestEACEngine_CreateDataLoadJob(t *testing.T) { datasetInputs := []datav1alpha1.Dataset{ { ObjectMeta: metav1.ObjectMeta{ - Name: "eacdemo", + Name: "efcdemo", Namespace: "fluid", }, }, @@ -94,7 +94,7 @@ func TestEACEngine_CreateDataLoadJob(t *testing.T) { statefulsetInputs := []appsv1.StatefulSet{ { ObjectMeta: metav1.ObjectMeta{ - Name: "eacdemo-worker", + Name: "efcdemo-worker", Namespace: "fluid", }, Spec: appsv1.StatefulSetSpec{ @@ -125,7 +125,7 @@ func TestEACEngine_CreateDataLoadJob(t *testing.T) { testScheme.AddKnownTypes(v1.SchemeGroupVersion, configMap) client := fake.NewFakeClientWithScheme(testScheme, testObjs...) engine := &EACEngine{ - name: "eacdemo", + name: "efcdemo", namespace: "fluid", Client: client, Log: fake.NullLogger(), @@ -180,7 +180,7 @@ func TestEACEngine_GenerateDataLoadValueFileWithRuntime(t *testing.T) { func TestEACEngine_CheckExistenceOfPath(t *testing.T) { configMap := &v1.ConfigMap{ ObjectMeta: metav1.ObjectMeta{ - Name: "eacdemo-eac-values", + Name: "efcdemo-efc-values", Namespace: "fluid", }, Data: map[string]string{ @@ -191,7 +191,7 @@ func TestEACEngine_CheckExistenceOfPath(t *testing.T) { datasetInputs := []datav1alpha1.Dataset{ { ObjectMeta: metav1.ObjectMeta{ - Name: "eacdemo", + Name: "efcdemo", Namespace: "fluid", }, Spec: datav1alpha1.DatasetSpec{}, @@ -201,7 +201,7 @@ func TestEACEngine_CheckExistenceOfPath(t *testing.T) { statefulsetInputs := []appsv1.StatefulSet{ { ObjectMeta: metav1.ObjectMeta{ - Name: "eacdemo-worker", + Name: "efcdemo-worker", Namespace: "fluid", }, Spec: appsv1.StatefulSetSpec{ @@ -255,14 +255,14 @@ func TestEACEngine_CheckExistenceOfPath(t *testing.T) { engine := EACEngine{ namespace: "fluid", Log: fake.NullLogger(), - name: "eacdemo", + name: "efcdemo", Client: client, } targetDataload := datav1alpha1.DataLoad{ Spec: datav1alpha1.DataLoadSpec{ Dataset: datav1alpha1.TargetDataset{ - Name: "eacdemo", + Name: "efcdemo", Namespace: "fluid", }, Target: []datav1alpha1.TargetPath{ diff --git a/pkg/ddc/eac/dataset.go b/pkg/ddc/eac/dataset.go index 9b0238e5d89..a1817ac38ea 100644 --- a/pkg/ddc/eac/dataset.go +++ b/pkg/ddc/eac/dataset.go @@ -124,7 +124,7 @@ func (e *EACEngine) UpdateCacheOfDataset() (err error) { datasetToUpdate.Status.Runtimes = utils.AddRuntimesIfNotExist(datasetToUpdate.Status.Runtimes, utils.NewRuntime(e.name, e.namespace, common.AccelerateCategory, - common.EACRuntime, + common.EFCRuntime, e.runtime.MasterReplicas())) e.Log.Info("the dataset status", "status", datasetToUpdate.Status) diff --git a/pkg/ddc/eac/dataset_test.go b/pkg/ddc/eac/dataset_test.go index 65d82c73a22..bb068966567 100644 --- a/pkg/ddc/eac/dataset_test.go +++ b/pkg/ddc/eac/dataset_test.go @@ -92,7 +92,7 @@ func TestUpdateCacheOfDataset(t *testing.T) { Name: "hbase", Namespace: "fluid", Category: common.AccelerateCategory, - Type: common.EACRuntime, + Type: common.EFCRuntime, MasterReplicas: 1, }, }, diff --git a/pkg/ddc/eac/delete_volume_test.go b/pkg/ddc/eac/delete_volume_test.go index b2504eae773..222f7b5d0b5 100644 --- a/pkg/ddc/eac/delete_volume_test.go +++ b/pkg/ddc/eac/delete_volume_test.go @@ -42,7 +42,7 @@ type TestCase struct { func newTestEACEngine(client client.Client, name string, namespace string, withRuntimeInfo bool) *EACEngine { runTime := &datav1alpha1.EFCRuntime{} - runTimeInfo, _ := base.BuildRuntimeInfo(name, namespace, common.EACRuntimeType, datav1alpha1.TieredStore{}) + runTimeInfo, _ := base.BuildRuntimeInfo(name, namespace, common.EFCRuntime, datav1alpha1.TieredStore{}) if !withRuntimeInfo { runTimeInfo = nil runTime = nil @@ -96,7 +96,7 @@ func TestEACEngine_DeleteVolume(t *testing.T) { testPVInputs := []*v1.PersistentVolume{ { ObjectMeta: metav1.ObjectMeta{ - Name: "fluid-eacdemo", + Name: "fluid-efcdemo", //Namespace: "fluid", Annotations: common.ExpectedFluidAnnotations, }, @@ -135,9 +135,9 @@ func TestEACEngine_DeleteVolume(t *testing.T) { } fakeClient := fake.NewFakeClientWithScheme(testScheme, tests...) - eacEngineCommon := newTestEACEngine(fakeClient, "eacdemo", "fluid", true) + eacEngineCommon := newTestEACEngine(fakeClient, "efcdemo", "fluid", true) eacEngineErr := newTestEACEngine(fakeClient, "error", "fluid", true) - eacEngineNoRunTime := newTestEACEngine(fakeClient, "eacdemo", "fluid", false) + eacEngineNoRunTime := newTestEACEngine(fakeClient, "efcdemo", "fluid", false) var testCases = []TestCase{ { engine: eacEngineCommon, diff --git a/pkg/ddc/eac/engine_test.go b/pkg/ddc/eac/engine_test.go index 3cd2763b308..e05935398ec 100644 --- a/pkg/ddc/eac/engine_test.go +++ b/pkg/ddc/eac/engine_test.go @@ -92,7 +92,7 @@ func TestBuild(t *testing.T) { }, Client: client, Log: fake.NullLogger(), - RuntimeType: common.EACRuntimeType, + RuntimeType: common.EFCRuntime, Runtime: &runtime, } @@ -108,7 +108,7 @@ func TestBuild(t *testing.T) { }, Client: client, Log: fake.NullLogger(), - RuntimeType: common.EACRuntimeType, + RuntimeType: common.EFCRuntime, Runtime: nil, } @@ -124,7 +124,7 @@ func TestBuild(t *testing.T) { }, Client: client, Log: fake.NullLogger(), - RuntimeType: common.EACRuntimeType, + RuntimeType: common.EFCRuntime, Runtime: &runtime, } @@ -140,7 +140,7 @@ func TestBuild(t *testing.T) { }, Client: client, Log: fake.NullLogger(), - RuntimeType: common.EACRuntimeType, + RuntimeType: common.EFCRuntime, Runtime: &datav1alpha1.JindoRuntime{}, } diff --git a/pkg/ddc/eac/health_check_test.go b/pkg/ddc/eac/health_check_test.go index d41629beb89..aa67bfef910 100644 --- a/pkg/ddc/eac/health_check_test.go +++ b/pkg/ddc/eac/health_check_test.go @@ -440,7 +440,7 @@ func TestCheckRuntimeHealthy(t *testing.T) { Log: ctrl.Log.WithName(tt.fields.name), } - runtimeInfo, err := base.BuildRuntimeInfo(tt.fields.name, tt.fields.namespace, common.EACRuntimeType, datav1alpha1.TieredStore{}) + runtimeInfo, err := base.BuildRuntimeInfo(tt.fields.name, tt.fields.namespace, common.EFCRuntime, datav1alpha1.TieredStore{}) if err != nil { t.Errorf("EACEngine.CheckWorkersReady() error = %v", err) } diff --git a/pkg/ddc/eac/master_internal.go b/pkg/ddc/eac/master_internal.go index ee6d1e96cc1..2e28c68769f 100644 --- a/pkg/ddc/eac/master_internal.go +++ b/pkg/ddc/eac/master_internal.go @@ -33,7 +33,7 @@ import ( // setup the cache master func (e *EACEngine) setupMasterInternal() (err error) { var ( - chartName = utils.GetChartsDirectory() + "/" + common.EACChart + chartName = utils.GetChartsDirectory() + "/" + common.EFCChart ) runtime, err := e.getRuntime() diff --git a/pkg/ddc/eac/master_internal_test.go b/pkg/ddc/eac/master_internal_test.go index 99c9afac1f7..ea222e93b7e 100644 --- a/pkg/ddc/eac/master_internal_test.go +++ b/pkg/ddc/eac/master_internal_test.go @@ -81,14 +81,14 @@ func TestSetupMasterInternal(t *testing.T) { } } - eacruntime := &datav1alpha1.EFCRuntime{ + efcruntime := &datav1alpha1.EFCRuntime{ ObjectMeta: metav1.ObjectMeta{ Name: "test", Namespace: "fluid", }, } testObjs := []runtime.Object{} - testObjs = append(testObjs, (*eacruntime).DeepCopy()) + testObjs = append(testObjs, (*efcruntime).DeepCopy()) var datasetInputs = []datav1alpha1.Dataset{ { @@ -99,7 +99,7 @@ func TestSetupMasterInternal(t *testing.T) { Spec: datav1alpha1.DatasetSpec{ Mounts: []datav1alpha1.Mount{ { - MountPoint: "eac://volume-uuid.region.nas.aliyuncs.com:/test-fluid-3", + MountPoint: "efc://volume-uuid.region.nas.aliyuncs.com:/test-fluid-3", }, }, }, @@ -115,7 +115,7 @@ func TestSetupMasterInternal(t *testing.T) { namespace: "fluid", Client: client, Log: fake.NullLogger(), - runtime: eacruntime, + runtime: efcruntime, } err := portallocator.SetupRuntimePortAllocator(client, &net.PortRange{Base: 10, Size: 100}, "bitmap", GetReservedPorts) @@ -209,14 +209,14 @@ func TestGenerateEACValueFile(t *testing.T) { } testObjs := []runtime.Object{} - eacruntime := &datav1alpha1.EFCRuntime{ + efcruntime := &datav1alpha1.EFCRuntime{ ObjectMeta: metav1.ObjectMeta{ Name: "test", Namespace: "fluid", }, Spec: datav1alpha1.EFCRuntimeSpec{}, } - testObjs = append(testObjs, (*eacruntime).DeepCopy()) + testObjs = append(testObjs, (*efcruntime).DeepCopy()) var datasetInputs = []datav1alpha1.Dataset{ { @@ -227,7 +227,7 @@ func TestGenerateEACValueFile(t *testing.T) { Spec: datav1alpha1.DatasetSpec{ Mounts: []datav1alpha1.Mount{ { - MountPoint: "eac://volume-uuid.region.nas.aliyuncs.com:/test-fluid-3", + MountPoint: "efc://volume-uuid.region.nas.aliyuncs.com:/test-fluid-3", }, }, }, @@ -244,7 +244,7 @@ func TestGenerateEACValueFile(t *testing.T) { namespace: "fluid", Client: client, Log: fake.NullLogger(), - runtime: eacruntime, + runtime: efcruntime, } err := portallocator.SetupRuntimePortAllocator(client, &net.PortRange{Base: 10, Size: 100}, "bitmap", GetReservedPorts) @@ -256,7 +256,7 @@ func TestGenerateEACValueFile(t *testing.T) { if err != nil { t.Fatal(err.Error()) } - _, err = engine.generateEACValueFile(eacruntime) + _, err = engine.generateEACValueFile(efcruntime) if err != nil { t.Errorf("fail to exec the function: %v", err) } @@ -266,7 +266,7 @@ func TestGenerateEACValueFile(t *testing.T) { if err != nil { t.Fatal(err.Error()) } - _, err = engine.generateEACValueFile(eacruntime) + _, err = engine.generateEACValueFile(efcruntime) if err == nil { t.Error("fail to mock error") } diff --git a/pkg/ddc/eac/node_test.go b/pkg/ddc/eac/node_test.go index efe3af5d8d3..6151431c241 100644 --- a/pkg/ddc/eac/node_test.go +++ b/pkg/ddc/eac/node_test.go @@ -48,7 +48,7 @@ func getTestEACEngineNode(client client.Client, name string, namespace string, w } if withRunTime { engine.runtime = &datav1alpha1.EFCRuntime{} - engine.runtimeInfo, _ = base.BuildRuntimeInfo(name, namespace, common.EACRuntimeType, datav1alpha1.TieredStore{}) + engine.runtimeInfo, _ = base.BuildRuntimeInfo(name, namespace, common.EFCRuntime, datav1alpha1.TieredStore{}) } return engine } @@ -69,11 +69,11 @@ func TestEACEngine_AssignNodesToCache(t *testing.T) { Name: "test-node-spark", Labels: map[string]string{ "fluid.io/dataset-num": "1", - "fluid.io/s-eac-fluid-spark": "true", + "fluid.io/s-efc-fluid-spark": "true", "fluid.io/s-fluid-spark": "true", - "fluid.io/s-h-eac-d-fluid-spark": "5B", - "fluid.io/s-h-eac-m-fluid-spark": "1B", - "fluid.io/s-h-eac-t-fluid-spark": "6B", + "fluid.io/s-h-efc-d-fluid-spark": "5B", + "fluid.io/s-h-efc-m-fluid-spark": "1B", + "fluid.io/s-h-efc-t-fluid-spark": "6B", "fluid_exclusive": "fluid_spark", }, }, @@ -83,16 +83,16 @@ func TestEACEngine_AssignNodesToCache(t *testing.T) { Name: "test-node-share", Labels: map[string]string{ "fluid.io/dataset-num": "2", - "fluid.io/s-eac-fluid-hadoop": "true", + "fluid.io/s-efc-fluid-hadoop": "true", "fluid.io/s-fluid-hadoop": "true", - "fluid.io/s-h-eac-d-fluid-hadoop": "5B", - "fluid.io/s-h-eac-m-fluid-hadoop": "1B", - "fluid.io/s-h-eac-t-fluid-hadoop": "6B", - "fluid.io/s-eac-fluid-hbase": "true", + "fluid.io/s-h-efc-d-fluid-hadoop": "5B", + "fluid.io/s-h-efc-m-fluid-hadoop": "1B", + "fluid.io/s-h-efc-t-fluid-hadoop": "6B", + "fluid.io/s-efc-fluid-hbase": "true", "fluid.io/s-fluid-hbase": "true", - "fluid.io/s-h-eac-d-fluid-hbase": "5B", - "fluid.io/s-h-eac-m-fluid-hbase": "1B", - "fluid.io/s-h-eac-t-fluid-hbase": "6B", + "fluid.io/s-h-efc-d-fluid-hbase": "5B", + "fluid.io/s-h-efc-m-fluid-hbase": "1B", + "fluid.io/s-h-efc-t-fluid-hbase": "6B", }, }, }, @@ -101,11 +101,11 @@ func TestEACEngine_AssignNodesToCache(t *testing.T) { Name: "test-node-hadoop", Labels: map[string]string{ "fluid.io/dataset-num": "1", - "fluid.io/s-eac-fluid-hadoop": "true", + "fluid.io/s-efc-fluid-hadoop": "true", "fluid.io/s-fluid-hadoop": "true", - "fluid.io/s-h-eac-d-fluid-hadoop": "5B", - "fluid.io/s-h-eac-m-fluid-hadoop": "1B", - "fluid.io/s-h-eac-t-fluid-hadoop": "6B", + "fluid.io/s-h-efc-d-fluid-hadoop": "5B", + "fluid.io/s-h-efc-m-fluid-hadoop": "1B", + "fluid.io/s-h-efc-t-fluid-hadoop": "6B", "node-select": "true", }, }, @@ -189,7 +189,7 @@ func TestSyncScheduleInfoToCacheNodes(t *testing.T) { Spec: appsv1.StatefulSetSpec{ Selector: &metav1.LabelSelector{ MatchLabels: map[string]string{ - "app": "eac", + "app": "efc", "role": "eac-worker", "fluid.io/dataset": "big-data-spark", }, @@ -209,7 +209,7 @@ func TestSyncScheduleInfoToCacheNodes(t *testing.T) { Controller: utilpointer.BoolPtr(true), }}, Labels: map[string]string{ - "app": "eac", + "app": "efc", "role": "eac-worker", "fluid.io/dataset": "big-data-spark", }, @@ -252,7 +252,7 @@ func TestSyncScheduleInfoToCacheNodes(t *testing.T) { Spec: appsv1.StatefulSetSpec{ Selector: &metav1.LabelSelector{ MatchLabels: map[string]string{ - "app": "eac", + "app": "efc", "role": "eac-worker", "fluid.io/dataset": "big-data-hbase", }, @@ -272,7 +272,7 @@ func TestSyncScheduleInfoToCacheNodes(t *testing.T) { Controller: utilpointer.BoolPtr(true), }}, Labels: map[string]string{ - "app": "eac", + "app": "efc", "role": "eac-worker", "fluid.io/dataset": "big-data-hbase", }, @@ -322,7 +322,7 @@ func TestSyncScheduleInfoToCacheNodes(t *testing.T) { Spec: appsv1.StatefulSetSpec{ Selector: &metav1.LabelSelector{ MatchLabels: map[string]string{ - "app": "eac", + "app": "efc", "role": "eac-worker", "fluid.io/dataset": "big-data-hbase-a", }, @@ -335,7 +335,7 @@ func TestSyncScheduleInfoToCacheNodes(t *testing.T) { Name: "hbase-a-worker-0", Namespace: "big-data", Labels: map[string]string{ - "app": "eac", + "app": "efc", "role": "eac-worker", "fluid.io/dataset": "big-data-hbase-a", }, diff --git a/pkg/ddc/eac/operations/base.go b/pkg/ddc/eac/operations/base.go index 08a0d1fdda8..058c76bdfde 100644 --- a/pkg/ddc/eac/operations/base.go +++ b/pkg/ddc/eac/operations/base.go @@ -118,7 +118,7 @@ func (a EACFileUtils) DeleteDir(dir string) (err error) { func (a EACFileUtils) Ready() (ready bool) { var ( - command = []string{"mount", "|", "grep", common.EACMountType} + command = []string{"mount", "|", "grep", common.EFCMountType} ) _, _, err := a.exec(command, true) diff --git a/pkg/ddc/eac/operations/base_test.go b/pkg/ddc/eac/operations/base_test.go index e4fa3e2829b..11df0dfc33a 100644 --- a/pkg/ddc/eac/operations/base_test.go +++ b/pkg/ddc/eac/operations/base_test.go @@ -34,12 +34,12 @@ const ( func TestNewEACFileUtils(t *testing.T) { var expectedResult = EACFileUtils{ - podName: "eacdemo", + podName: "efcdemo", namespace: "default", container: "eac-master", log: fake.NullLogger(), } - result := NewEACFileUtils("eacdemo", "eac-master", "default", fake.NullLogger()) + result := NewEACFileUtils("efcdemo", "eac-master", "default", fake.NullLogger()) if !reflect.DeepEqual(expectedResult, result) { t.Errorf("fail to create the EACFileUtils, want: %v, got: %v", expectedResult, result) } diff --git a/pkg/ddc/eac/port_parser.go b/pkg/ddc/eac/port_parser.go index 9890b224385..d35277dcaf2 100644 --- a/pkg/ddc/eac/port_parser.go +++ b/pkg/ddc/eac/port_parser.go @@ -38,7 +38,7 @@ func GetReservedPorts(client client.Client) (ports []int, err error) { if len(dataset.Status.Runtimes) != 0 { // Assume there is only one runtime with category "Accelerate" accelerateRuntime := dataset.Status.Runtimes[0] - if accelerateRuntime.Type != "eac" { + if accelerateRuntime.Type != "efc" { continue } configMapName := fmt.Sprintf("%s-%s-values", accelerateRuntime.Name, accelerateRuntime.Type) diff --git a/pkg/ddc/eac/port_parser_test.go b/pkg/ddc/eac/port_parser_test.go index 566790dc09d..075d1a23df2 100644 --- a/pkg/ddc/eac/port_parser_test.go +++ b/pkg/ddc/eac/port_parser_test.go @@ -30,7 +30,7 @@ import ( func TestGetReservedPorts(t *testing.T) { configMap := &v1.ConfigMap{ ObjectMeta: metav1.ObjectMeta{ - Name: "hbase-eac-values", + Name: "hbase-efc-values", Namespace: "fluid", }, Data: map[string]string{ @@ -48,7 +48,7 @@ func TestGetReservedPorts(t *testing.T) { { Name: "hbase", Namespace: "fluid", - Type: common.EACRuntimeType, + Type: common.EFCRuntime, }, }, }, @@ -80,7 +80,7 @@ func TestGetReservedPorts(t *testing.T) { Status: v1alpha1.DatasetStatus{ Runtimes: []v1alpha1.Runtime{ { - Type: common.EACRuntimeType, + Type: common.EFCRuntime, }, }, }, diff --git a/pkg/ddc/eac/replicas_test.go b/pkg/ddc/eac/replicas_test.go index 606bb4c5bbe..3d5e23378b8 100644 --- a/pkg/ddc/eac/replicas_test.go +++ b/pkg/ddc/eac/replicas_test.go @@ -37,7 +37,7 @@ import ( ) func newEACEngineREP(client client.Client, name string, namespace string) *EACEngine { - runTimeInfo, _ := base.BuildRuntimeInfo(name, namespace, common.EACRuntimeType, datav1alpha1.TieredStore{}) + runTimeInfo, _ := base.BuildRuntimeInfo(name, namespace, common.EFCRuntime, datav1alpha1.TieredStore{}) engine := &EACEngine{ runtime: &datav1alpha1.EFCRuntime{}, name: name, @@ -57,11 +57,11 @@ func TestSyncReplicas(t *testing.T) { Name: "test-node-spark", Labels: map[string]string{ "fluid.io/dataset-num": "1", - "fluid.io/s-eac-fluid-spark": "true", + "fluid.io/s-efc-fluid-spark": "true", "fluid.io/s-fluid-spark": "true", - "fluid.io/s-h-eac-d-fluid-spark": "5B", - "fluid.io/s-h-eac-m-fluid-spark": "1B", - "fluid.io/s-h-eac-t-fluid-spark": "6B", + "fluid.io/s-h-efc-d-fluid-spark": "5B", + "fluid.io/s-h-efc-m-fluid-spark": "1B", + "fluid.io/s-h-efc-t-fluid-spark": "6B", "fluid_exclusive": "fluid_spark", }, }, @@ -71,16 +71,16 @@ func TestSyncReplicas(t *testing.T) { Name: "test-node-share", Labels: map[string]string{ "fluid.io/dataset-num": "2", - "fluid.io/s-eac-fluid-hadoop": "true", + "fluid.io/s-efc-fluid-hadoop": "true", "fluid.io/s-fluid-hadoop": "true", - "fluid.io/s-h-eac-d-fluid-hadoop": "5B", - "fluid.io/s-h-eac-m-fluid-hadoop": "1B", - "fluid.io/s-h-eac-t-fluid-hadoop": "6B", - "fluid.io/s-eac-fluid-hbase": "true", + "fluid.io/s-h-efc-d-fluid-hadoop": "5B", + "fluid.io/s-h-efc-m-fluid-hadoop": "1B", + "fluid.io/s-h-efc-t-fluid-hadoop": "6B", + "fluid.io/s-efc-fluid-hbase": "true", "fluid.io/s-fluid-hbase": "true", - "fluid.io/s-h-eac-d-fluid-hbase": "5B", - "fluid.io/s-h-eac-m-fluid-hbase": "1B", - "fluid.io/s-h-eac-t-fluid-hbase": "6B", + "fluid.io/s-h-efc-d-fluid-hbase": "5B", + "fluid.io/s-h-efc-m-fluid-hbase": "1B", + "fluid.io/s-h-efc-t-fluid-hbase": "6B", }, }, }, @@ -89,11 +89,11 @@ func TestSyncReplicas(t *testing.T) { Name: "test-node-hadoop", Labels: map[string]string{ "fluid.io/dataset-num": "1", - "fluid.io/s-eac-fluid-hadoop": "true", + "fluid.io/s-efc-fluid-hadoop": "true", "fluid.io/s-fluid-hadoop": "true", - "fluid.io/s-h-eac-d-fluid-hadoop": "5B", - "fluid.io/s-h-eac-m-fluid-hadoop": "1B", - "fluid.io/s-h-eac-t-fluid-hadoop": "6B", + "fluid.io/s-h-efc-d-fluid-hadoop": "5B", + "fluid.io/s-h-efc-m-fluid-hadoop": "1B", + "fluid.io/s-h-efc-t-fluid-hadoop": "6B", "node-select": "true", }, }, diff --git a/pkg/ddc/eac/runtime_info_test.go b/pkg/ddc/eac/runtime_info_test.go index c2d4ea9670e..9a8bf3f9b04 100644 --- a/pkg/ddc/eac/runtime_info_test.go +++ b/pkg/ddc/eac/runtime_info_test.go @@ -33,7 +33,7 @@ import ( ) func newEACEngineRT(client client.Client, name string, namespace string, withRuntimeInfo bool, unittest bool) *EACEngine { - runTimeInfo, _ := base.BuildRuntimeInfo(name, namespace, common.EACRuntimeType, datav1alpha1.TieredStore{}) + runTimeInfo, _ := base.BuildRuntimeInfo(name, namespace, common.EFCRuntime, datav1alpha1.TieredStore{}) engine := &EACEngine{ runtime: nil, name: name, diff --git a/pkg/ddc/eac/sessmgr.go b/pkg/ddc/eac/sessmgr.go index c5a76d5d6a7..015a48495f2 100644 --- a/pkg/ddc/eac/sessmgr.go +++ b/pkg/ddc/eac/sessmgr.go @@ -51,19 +51,19 @@ func (s *SessMgrInitializer) initSessMgr(ctx context.Context) error { } func (s *SessMgrInitializer) loadSessMgrConfig() (config config, err error) { - if imageEnvVar, exists := os.LookupEnv(common.EACSessMgrImageEnv); exists { + if imageEnvVar, exists := os.LookupEnv(common.EFCSessMgrImageEnv); exists { config.SessMgrImage = imageEnvVar } else { - config.SessMgrImage = common.DefaultEACSessMgrImage + config.SessMgrImage = common.DefaultEFCSessMgrImage } - if imageEnvVar, exists := os.LookupEnv(common.EACInitFuseImageEnv); exists { + if imageEnvVar, exists := os.LookupEnv(common.EFCInitFuseImageEnv); exists { config.InitFuseImage = imageEnvVar } else { - config.InitFuseImage = common.DefaultEACInitFuseImage + config.InitFuseImage = common.DefaultEFCInitFuseImage } - if updateStrategyEnvVar, exists := os.LookupEnv(common.EACSessMgrUpdateStrategyEnv); exists { + if updateStrategyEnvVar, exists := os.LookupEnv(common.EFCSessMgrUpdateStrategyEnv); exists { switch updateStrategyEnvVar { case string(appsv1.RollingUpdateDaemonSetStrategyType): config.UpdateStrategy = appsv1.RollingUpdateDaemonSetStrategyType @@ -127,7 +127,7 @@ func (s *SessMgrInitializer) deploySessMgr(ctx context.Context, config config) e Spec: appsv1.DaemonSetSpec{ Selector: &metav1.LabelSelector{ MatchLabels: map[string]string{ - "app": "eac-sessmgr", + "app": "efc-sessmgr", }, }, UpdateStrategy: appsv1.DaemonSetUpdateStrategy{ @@ -139,7 +139,7 @@ func (s *SessMgrInitializer) deploySessMgr(ctx context.Context, config config) e "sidecar.istio.io/inject": "false", }, Labels: map[string]string{ - "app": "eac-sessmgr", + "app": "efc-sessmgr", }, }, Spec: corev1.PodSpec{ diff --git a/pkg/ddc/eac/shutdown_test.go b/pkg/ddc/eac/shutdown_test.go index c30afa1fbce..7f8b61d3448 100644 --- a/pkg/ddc/eac/shutdown_test.go +++ b/pkg/ddc/eac/shutdown_test.go @@ -47,7 +47,7 @@ func init() { func TestDestroyWorker(t *testing.T) { // runtimeInfoSpark tests destroy Worker in exclusive mode. - runtimeInfoSpark, err := base.BuildRuntimeInfo("spark", "fluid", common.EACRuntimeType, datav1alpha1.TieredStore{}) + runtimeInfoSpark, err := base.BuildRuntimeInfo("spark", "fluid", common.EFCRuntime, datav1alpha1.TieredStore{}) if err != nil { t.Errorf("fail to create the runtimeInfo with error %v", err) } @@ -56,7 +56,7 @@ func TestDestroyWorker(t *testing.T) { }) // runtimeInfoHadoop tests destroy Worker in shareMode mode. - runtimeInfoHadoop, err := base.BuildRuntimeInfo("hadoop", "fluid", common.EACRuntimeType, datav1alpha1.TieredStore{}) + runtimeInfoHadoop, err := base.BuildRuntimeInfo("hadoop", "fluid", common.EFCRuntime, datav1alpha1.TieredStore{}) if err != nil { t.Errorf("fail to create the runtimeInfo with error %v", err) } @@ -74,11 +74,11 @@ func TestDestroyWorker(t *testing.T) { Name: "test-node-spark", Labels: map[string]string{ "fluid.io/dataset-num": "1", - "fluid.io/s-eac-fluid-spark": "true", + "fluid.io/s-efc-fluid-spark": "true", "fluid.io/s-fluid-spark": "true", - "fluid.io/s-h-eac-d-fluid-spark": "5B", - "fluid.io/s-h-eac-m-fluid-spark": "1B", - "fluid.io/s-h-eac-t-fluid-spark": "6B", + "fluid.io/s-h-efc-d-fluid-spark": "5B", + "fluid.io/s-h-efc-m-fluid-spark": "1B", + "fluid.io/s-h-efc-t-fluid-spark": "6B", "fluid_exclusive": "fluid_spark", }, }, @@ -88,16 +88,16 @@ func TestDestroyWorker(t *testing.T) { Name: "test-node-share", Labels: map[string]string{ "fluid.io/dataset-num": "2", - "fluid.io/s-eac-fluid-hadoop": "true", + "fluid.io/s-efc-fluid-hadoop": "true", "fluid.io/s-fluid-hadoop": "true", - "fluid.io/s-h-eac-d-fluid-hadoop": "5B", - "fluid.io/s-h-eac-m-fluid-hadoop": "1B", - "fluid.io/s-h-eac-t-fluid-hadoop": "6B", - "fluid.io/s-eac-fluid-hbase": "true", + "fluid.io/s-h-efc-d-fluid-hadoop": "5B", + "fluid.io/s-h-efc-m-fluid-hadoop": "1B", + "fluid.io/s-h-efc-t-fluid-hadoop": "6B", + "fluid.io/s-efc-fluid-hbase": "true", "fluid.io/s-fluid-hbase": "true", - "fluid.io/s-h-eac-d-fluid-hbase": "5B", - "fluid.io/s-h-eac-m-fluid-hbase": "1B", - "fluid.io/s-h-eac-t-fluid-hbase": "6B", + "fluid.io/s-h-efc-d-fluid-hbase": "5B", + "fluid.io/s-h-efc-m-fluid-hbase": "1B", + "fluid.io/s-h-efc-t-fluid-hbase": "6B", }, }, }, @@ -106,11 +106,11 @@ func TestDestroyWorker(t *testing.T) { Name: "test-node-hadoop", Labels: map[string]string{ "fluid.io/dataset-num": "1", - "fluid.io/s-eac-fluid-hadoop": "true", + "fluid.io/s-efc-fluid-hadoop": "true", "fluid.io/s-fluid-hadoop": "true", - "fluid.io/s-h-eac-d-fluid-hadoop": "5B", - "fluid.io/s-h-eac-m-fluid-hadoop": "1B", - "fluid.io/s-h-eac-t-fluid-hadoop": "6B", + "fluid.io/s-h-efc-d-fluid-hadoop": "5B", + "fluid.io/s-h-efc-m-fluid-hadoop": "1B", + "fluid.io/s-h-efc-t-fluid-hadoop": "6B", "node-select": "true", }, }, @@ -138,24 +138,24 @@ func TestDestroyWorker(t *testing.T) { "test-node-spark": {}, "test-node-share": { "fluid.io/dataset-num": "2", - "fluid.io/s-eac-fluid-hadoop": "true", + "fluid.io/s-efc-fluid-hadoop": "true", "fluid.io/s-fluid-hadoop": "true", - "fluid.io/s-h-eac-d-fluid-hadoop": "5B", - "fluid.io/s-h-eac-m-fluid-hadoop": "1B", - "fluid.io/s-h-eac-t-fluid-hadoop": "6B", - "fluid.io/s-eac-fluid-hbase": "true", + "fluid.io/s-h-efc-d-fluid-hadoop": "5B", + "fluid.io/s-h-efc-m-fluid-hadoop": "1B", + "fluid.io/s-h-efc-t-fluid-hadoop": "6B", + "fluid.io/s-efc-fluid-hbase": "true", "fluid.io/s-fluid-hbase": "true", - "fluid.io/s-h-eac-d-fluid-hbase": "5B", - "fluid.io/s-h-eac-m-fluid-hbase": "1B", - "fluid.io/s-h-eac-t-fluid-hbase": "6B", + "fluid.io/s-h-efc-d-fluid-hbase": "5B", + "fluid.io/s-h-efc-m-fluid-hbase": "1B", + "fluid.io/s-h-efc-t-fluid-hbase": "6B", }, "test-node-hadoop": { "fluid.io/dataset-num": "1", - "fluid.io/s-eac-fluid-hadoop": "true", + "fluid.io/s-efc-fluid-hadoop": "true", "fluid.io/s-fluid-hadoop": "true", - "fluid.io/s-h-eac-d-fluid-hadoop": "5B", - "fluid.io/s-h-eac-m-fluid-hadoop": "1B", - "fluid.io/s-h-eac-t-fluid-hadoop": "6B", + "fluid.io/s-h-efc-d-fluid-hadoop": "5B", + "fluid.io/s-h-efc-m-fluid-hadoop": "1B", + "fluid.io/s-h-efc-t-fluid-hadoop": "6B", "node-select": "true", }, }, @@ -168,11 +168,11 @@ func TestDestroyWorker(t *testing.T) { "test-node-spark": {}, "test-node-share": { "fluid.io/dataset-num": "1", - "fluid.io/s-eac-fluid-hbase": "true", + "fluid.io/s-efc-fluid-hbase": "true", "fluid.io/s-fluid-hbase": "true", - "fluid.io/s-h-eac-d-fluid-hbase": "5B", - "fluid.io/s-h-eac-m-fluid-hbase": "1B", - "fluid.io/s-h-eac-t-fluid-hbase": "6B", + "fluid.io/s-h-efc-d-fluid-hbase": "5B", + "fluid.io/s-h-efc-m-fluid-hbase": "1B", + "fluid.io/s-h-efc-t-fluid-hbase": "6B", }, "test-node-hadoop": { "node-select": "true", @@ -230,10 +230,10 @@ func TestEACEngineCleanAll(t *testing.T) { fields: fields{ name: "spark", namespace: "fluid", - runtimeType: "eac", + runtimeType: "efc", cm: &corev1.ConfigMap{ ObjectMeta: metav1.ObjectMeta{ - Name: "spark-eac-values", + Name: "spark-efc-values", Namespace: "fluid", }, Data: map[string]string{"data": valuesConfigMapData}, @@ -284,10 +284,10 @@ func TestEACEngineReleasePorts(t *testing.T) { fields: fields{ name: "spark", namespace: "fluid", - runtimeType: "eac", + runtimeType: "efc", cm: &corev1.ConfigMap{ ObjectMeta: metav1.ObjectMeta{ - Name: "spark-eac-values", + Name: "spark-efc-values", Namespace: "fluid", }, Data: map[string]string{"data": valuesConfigMapData}, diff --git a/pkg/ddc/eac/transform_image.go b/pkg/ddc/eac/transform_image.go index 8af7994b6b9..02640296497 100644 --- a/pkg/ddc/eac/transform_image.go +++ b/pkg/ddc/eac/transform_image.go @@ -29,9 +29,9 @@ func (e *EACEngine) parseMasterImage(image string, tag string, imagePullPolicy s } if len(image) == 0 { - image = docker.GetImageRepoFromEnv(common.EACMasterImageEnv) + image = docker.GetImageRepoFromEnv(common.EFCMasterImageEnv) if len(image) == 0 { - runtimeImageInfo := strings.Split(common.DefaultEACMasterImage, ":") + runtimeImageInfo := strings.Split(common.DefaultEFCMasterImage, ":") if len(runtimeImageInfo) < 1 { panic("invalid default eac master image!") } else { @@ -41,9 +41,9 @@ func (e *EACEngine) parseMasterImage(image string, tag string, imagePullPolicy s } if len(tag) == 0 { - tag = docker.GetImageTagFromEnv(common.EACMasterImageEnv) + tag = docker.GetImageTagFromEnv(common.EFCMasterImageEnv) if len(tag) == 0 { - runtimeImageInfo := strings.Split(common.DefaultEACMasterImage, ":") + runtimeImageInfo := strings.Split(common.DefaultEFCMasterImage, ":") if len(runtimeImageInfo) < 2 { panic("invalid default eac master image!") } else { @@ -61,9 +61,9 @@ func (e *EACEngine) parseWorkerImage(image string, tag string, imagePullPolicy s } if len(image) == 0 { - image = docker.GetImageRepoFromEnv(common.EACWorkerImageEnv) + image = docker.GetImageRepoFromEnv(common.EFCWorkerImageEnv) if len(image) == 0 { - runtimeImageInfo := strings.Split(common.DefaultEACWorkerImage, ":") + runtimeImageInfo := strings.Split(common.DefaultEFCWorkerImage, ":") if len(runtimeImageInfo) < 1 { panic("invalid default eac worker image!") } else { @@ -73,9 +73,9 @@ func (e *EACEngine) parseWorkerImage(image string, tag string, imagePullPolicy s } if len(tag) == 0 { - tag = docker.GetImageTagFromEnv(common.EACWorkerImageEnv) + tag = docker.GetImageTagFromEnv(common.EFCWorkerImageEnv) if len(tag) == 0 { - runtimeImageInfo := strings.Split(common.DefaultEACWorkerImage, ":") + runtimeImageInfo := strings.Split(common.DefaultEFCWorkerImage, ":") if len(runtimeImageInfo) < 2 { panic("invalid default eac worker image!") } else { @@ -93,9 +93,9 @@ func (e *EACEngine) parseFuseImage(image string, tag string, imagePullPolicy str } if len(image) == 0 { - image = docker.GetImageRepoFromEnv(common.EACFuseImageEnv) + image = docker.GetImageRepoFromEnv(common.EFCFuseImageEnv) if len(image) == 0 { - runtimeImageInfo := strings.Split(common.DefaultEACFuseImage, ":") + runtimeImageInfo := strings.Split(common.DefaultEFCFuseImage, ":") if len(runtimeImageInfo) < 1 { panic("invalid default eac fuse image!") } else { @@ -105,9 +105,9 @@ func (e *EACEngine) parseFuseImage(image string, tag string, imagePullPolicy str } if len(tag) == 0 { - tag = docker.GetImageTagFromEnv(common.EACFuseImageEnv) + tag = docker.GetImageTagFromEnv(common.EFCFuseImageEnv) if len(tag) == 0 { - runtimeImageInfo := strings.Split(common.DefaultEACFuseImage, ":") + runtimeImageInfo := strings.Split(common.DefaultEFCFuseImage, ":") if len(runtimeImageInfo) < 2 { panic("invalid default eac fuse image!") } else { @@ -125,9 +125,9 @@ func (e *EACEngine) parseInitFuseImage(image string, tag string, imagePullPolicy } if len(image) == 0 { - image = docker.GetImageRepoFromEnv(common.EACInitFuseImageEnv) + image = docker.GetImageRepoFromEnv(common.EFCInitFuseImageEnv) if len(image) == 0 { - runtimeImageInfo := strings.Split(common.DefaultEACInitFuseImage, ":") + runtimeImageInfo := strings.Split(common.DefaultEFCInitFuseImage, ":") if len(runtimeImageInfo) < 1 { panic("invalid default eac init alifuse image!") } else { @@ -137,9 +137,9 @@ func (e *EACEngine) parseInitFuseImage(image string, tag string, imagePullPolicy } if len(tag) == 0 { - tag = docker.GetImageTagFromEnv(common.EACInitFuseImageEnv) + tag = docker.GetImageTagFromEnv(common.EFCInitFuseImageEnv) if len(tag) == 0 { - runtimeImageInfo := strings.Split(common.DefaultEACInitFuseImage, ":") + runtimeImageInfo := strings.Split(common.DefaultEFCInitFuseImage, ":") if len(runtimeImageInfo) < 2 { panic("invalid default eac init alifuse image!") } else { diff --git a/pkg/ddc/eac/transform_image_test.go b/pkg/ddc/eac/transform_image_test.go index 4236165fc19..42d534b458f 100644 --- a/pkg/ddc/eac/transform_image_test.go +++ b/pkg/ddc/eac/transform_image_test.go @@ -23,7 +23,7 @@ import ( func TestParseMasterImage(t *testing.T) { engine := &EACEngine{} image, tag, imagePullPolicy := engine.parseMasterImage("", "", "") - if image != "registry.cn-zhangjiakou.aliyuncs.com/nasteam/eac-fluid-img" || + if image != "registry.cn-zhangjiakou.aliyuncs.com/nascache/eac-master" || tag != "update" || imagePullPolicy != "IfNotPresent" { t.Errorf("unexpected err") } @@ -32,7 +32,7 @@ func TestParseMasterImage(t *testing.T) { func TestParseFuseImage(t *testing.T) { engine := &EACEngine{} image, tag, imagePullPolicy := engine.parseFuseImage("", "", "") - if image != "registry.cn-zhangjiakou.aliyuncs.com/nasteam/eac-fluid-img" || + if image != "registry.cn-zhangjiakou.aliyuncs.com/nascache/eac-fuse" || tag != "update" || imagePullPolicy != "IfNotPresent" { t.Errorf("unexpected err") } @@ -41,7 +41,7 @@ func TestParseFuseImage(t *testing.T) { func TestParseWorkerImage(t *testing.T) { engine := &EACEngine{} image, tag, imagePullPolicy := engine.parseWorkerImage("", "", "") - if image != "registry.cn-zhangjiakou.aliyuncs.com/nasteam/eac-worker-img" || + if image != "registry.cn-zhangjiakou.aliyuncs.com/nascache/eac-worker" || tag != "update" || imagePullPolicy != "IfNotPresent" { t.Errorf("unexpected err") } @@ -50,7 +50,7 @@ func TestParseWorkerImage(t *testing.T) { func TestParseInitFuseImage(t *testing.T) { engine := &EACEngine{} image, tag, imagePullPolicy := engine.parseInitFuseImage("", "", "") - if image != "registry.cn-zhangjiakou.aliyuncs.com/nasteam/init-alifuse" || + if image != "registry.cn-zhangjiakou.aliyuncs.com/nascache/init-alifuse" || tag != "update" || imagePullPolicy != "IfNotPresent" { t.Errorf("unexpected err") } diff --git a/pkg/ddc/eac/transform_test.go b/pkg/ddc/eac/transform_test.go index 6f65803ee7c..dba855cf33f 100644 --- a/pkg/ddc/eac/transform_test.go +++ b/pkg/ddc/eac/transform_test.go @@ -53,7 +53,7 @@ func TestEACEngine_transform(t *testing.T) { Spec: datav1alpha1.DatasetSpec{ Mounts: []datav1alpha1.Mount{ { - MountPoint: "eac://abcd-abc67.cn-zhangjiakou.nas.aliyuncs.com:/test-fluid-3/", + MountPoint: "efc://abcd-abc67.cn-zhangjiakou.nas.aliyuncs.com:/test-fluid-3/", }, }, }, diff --git a/pkg/ddc/eac/ufs_test.go b/pkg/ddc/eac/ufs_test.go index a0791c6b35d..6963ff1eab2 100644 --- a/pkg/ddc/eac/ufs_test.go +++ b/pkg/ddc/eac/ufs_test.go @@ -26,7 +26,7 @@ package eac // Spec: datav1alpha1.DatasetSpec{ // Mounts: []datav1alpha1.Mount{ // { -// MountPoint: "eac://volume-uuid.region.nas.aliyuncs.com:/test-fluid-3", +// MountPoint: "efc://volume-uuid.region.nas.aliyuncs.com:/test-fluid-3", // EncryptOptions: []datav1alpha1.EncryptOption{ // { // Name: AccessKeyIDName, @@ -59,7 +59,7 @@ package eac // Spec: datav1alpha1.DatasetSpec{ // Mounts: []datav1alpha1.Mount{ // { -// MountPoint: "eac://volume-uuid.region.nas.aliyuncs.com:/test-fluid-3", +// MountPoint: "efc://volume-uuid.region.nas.aliyuncs.com:/test-fluid-3", // }, // }, // }, @@ -125,7 +125,7 @@ package eac // Spec: datav1alpha1.DatasetSpec{ // Mounts: []datav1alpha1.Mount{ // { -// MountPoint: "eac://volume-uuid.region.nas.aliyuncs.com:/test-fluid-3", +// MountPoint: "efc://volume-uuid.region.nas.aliyuncs.com:/test-fluid-3", // EncryptOptions: []datav1alpha1.EncryptOption{ // { // Name: AccessKeyIDName, @@ -158,7 +158,7 @@ package eac // Spec: datav1alpha1.DatasetSpec{ // Mounts: []datav1alpha1.Mount{ // { -// MountPoint: "eac://volume-uuid.region.nas.aliyuncs.com:/test-fluid-3", +// MountPoint: "efc://volume-uuid.region.nas.aliyuncs.com:/test-fluid-3", // }, // }, // }, @@ -241,7 +241,7 @@ package eac // Spec: datav1alpha1.DatasetSpec{ // Mounts: []datav1alpha1.Mount{ // { -// MountPoint: "eac://volume-uuid.region.nas.aliyuncs.com:/test-fluid-3", +// MountPoint: "efc://volume-uuid.region.nas.aliyuncs.com:/test-fluid-3", // EncryptOptions: []datav1alpha1.EncryptOption{ // { // Name: AccessKeyIDName, @@ -274,7 +274,7 @@ package eac // Spec: datav1alpha1.DatasetSpec{ // Mounts: []datav1alpha1.Mount{ // { -// MountPoint: "eac://volume-uuid.region.nas.aliyuncs.com:/test-fluid-3", +// MountPoint: "efc://volume-uuid.region.nas.aliyuncs.com:/test-fluid-3", // }, // }, // }, diff --git a/pkg/ddc/eac/utils.go b/pkg/ddc/eac/utils.go index da1004eaf84..e87084dce8a 100644 --- a/pkg/ddc/eac/utils.go +++ b/pkg/ddc/eac/utils.go @@ -97,9 +97,9 @@ func (e *EACEngine) getHostMountPath() (mountPath string) { func getMountRoot() (path string) { path, err := utils.GetMountRoot() if err != nil { - path = "/" + common.EACRuntime + path = "/" + common.EFCRuntime } else { - path = path + "/" + common.EACRuntime + path = path + "/" + common.EFCRuntime } return } diff --git a/pkg/ddc/eac/utils_test.go b/pkg/ddc/eac/utils_test.go index ad8aa0753c6..a25bd6c76db 100644 --- a/pkg/ddc/eac/utils_test.go +++ b/pkg/ddc/eac/utils_test.go @@ -38,17 +38,17 @@ import ( ) var valuesConfigMapData = ` -fullnameOverride: eacdemo +fullnameOverride: efcdemo placement: Exclusive master: - image: registry.cn-zhangjiakou.aliyuncs.com/nasteam/eac-fluid-img + image: registry.cn-zhangjiakou.aliyuncs.com/nascache/eac-fuse imageTag: update imagePullPolicy: IfNotPresent imagePullSecrets: [] mountPoint: 123456-abcd.cn-zhangjiakou.nas.aliyuncs.com:/test-fluid-3/ count: 1 enabled: true - option: client_owner=default-eacdemo-master,assign_uuid=default-eacdemo-master,g_tier_EnableDadi=true,g_tier_DadiEnablePrefetch=true + option: client_owner=default-efcdemo-master,assign_uuid=default-efcdemo-master,g_tier_EnableDadi=true,g_tier_DadiEnablePrefetch=true hostNetwork: true tieredstore: levels: @@ -57,14 +57,14 @@ master: type: emptyDir path: /dev/shm worker: - image: registry.cn-zhangjiakou.aliyuncs.com/nasteam/eac-worker-img + image: registry.cn-zhangjiakou.aliyuncs.com/nascache/eac-worker imageTag: update imagePullPolicy: IfNotPresent imagePullSecrets: [] port: rpc: 17673 enabled: true - option: cache_capacity_gb=2,cache_media=/dev/eac-worker-cache-path/default/eacdemo,server_port=17673 + option: cache_capacity_gb=2,cache_media=/dev/efc-worker-cache-path/default/efcdemo,server_port=17673 resources: requests: memory: 1953125Ki @@ -75,20 +75,20 @@ worker: level: 0 mediumtype: SSD type: emptyDir - path: /dev/eac-worker-cache-path/default/eacdemo + path: /dev/efc-worker-cache-path/default/efcdemo quota: 2GB fuse: - image: registry.cn-zhangjiakou.aliyuncs.com/nasteam/eac-fluid-img + image: registry.cn-zhangjiakou.aliyuncs.com/nascache/eac-fuse imageTag: update imagePullPolicy: IfNotPresent imagePullSecrets: [] mountPoint: 123456-abcd.cn-zhangjiakou.nas.aliyuncs.com:/test-fluid-3/ - hostMountPath: /runtime-mnt/eac/default/eacdemo + hostMountPath: /runtime-mnt/efc/default/efcdemo port: monitor: 17645 - option: assign_uuid=default-eacdemo-fuse,g_tier_EnableDadi=true,g_tier_DadiEnablePrefetch=true + option: assign_uuid=default-efcdemo-fuse,g_tier_EnableDadi=true,g_tier_DadiEnablePrefetch=true nodeSelector: - fluid.io/f-default-eacdemo: "true" + fluid.io/f-default-efcdemo: "true" hostNetwork: true tieredstore: levels: @@ -98,7 +98,7 @@ fuse: path: /dev/shm criticalPod: true initFuse: - image: registry.cn-zhangjiakou.aliyuncs.com/nasteam/init-alifuse + image: registry.cn-zhangjiakou.aliyuncs.com/nascache/init-alifuse imageTag: update imagePullPolicy: IfNotPresent imagePullSecrets: [] @@ -112,7 +112,7 @@ var workerEndpointsConfigMapData = ` ` func newEACEngine(client client.Client, name string, namespace string) *EACEngine { - runTimeInfo, _ := base.BuildRuntimeInfo(name, namespace, common.EACRuntimeType, datav1alpha1.TieredStore{}) + runTimeInfo, _ := base.BuildRuntimeInfo(name, namespace, common.EFCRuntime, datav1alpha1.TieredStore{}) engine := &EACEngine{ runtime: &datav1alpha1.EFCRuntime{}, name: name, @@ -128,7 +128,7 @@ func newEACEngine(client client.Client, name string, namespace string) *EACEngin func Test_parsePortsFromConfigMap(t *testing.T) { configMap := &corev1.ConfigMap{ ObjectMeta: metav1.ObjectMeta{ - Name: "hbase-eac-values", + Name: "hbase-efc-values", Namespace: "fluid", }, Data: map[string]string{ @@ -147,7 +147,7 @@ func Test_parsePortsFromConfigMap(t *testing.T) { name: "hbase", namespace: "fluid", Client: mockClient, - runtimeType: common.EACRuntimeType, + runtimeType: common.EFCRuntime, Log: ctrl.Log.WithName("hbase"), } configMap, err := kubeclient.GetConfigmapByName(mockClient, e.getConfigmapName(), e.namespace) @@ -168,7 +168,7 @@ func Test_parsePortsFromConfigMap(t *testing.T) { func Test_parseCacheDirFromConfigMap(t *testing.T) { configMap := &corev1.ConfigMap{ ObjectMeta: metav1.ObjectMeta{ - Name: "hbase-eac-values", + Name: "hbase-efc-values", Namespace: "fluid", }, Data: map[string]string{ @@ -187,7 +187,7 @@ func Test_parseCacheDirFromConfigMap(t *testing.T) { name: "hbase", namespace: "fluid", Client: mockClient, - runtimeType: common.EACRuntimeType, + runtimeType: common.EFCRuntime, Log: ctrl.Log.WithName("hbase"), } configMap, err := kubeclient.GetConfigmapByName(mockClient, e.getConfigmapName(), e.namespace) @@ -200,7 +200,7 @@ func Test_parseCacheDirFromConfigMap(t *testing.T) { } cacheDir, cacheType, err := parseCacheDirFromConfigMap(configMap) - if err != nil || cacheDir != "/dev/eac-worker-cache-path/default/eacdemo" || cacheType != common.VolumeTypeEmptyDir { + if err != nil || cacheDir != "/dev/efc-worker-cache-path/default/efcdemo" || cacheType != common.VolumeTypeEmptyDir { t.Errorf("fail to exec") } } @@ -283,7 +283,7 @@ func TestEACEngine_getMountPath(t *testing.T) { { name: "test", fields: fields{ - name: "eac", + name: "efc", namespace: "default", Log: fake.NullLogger(), MountRoot: "/tmp", @@ -298,7 +298,7 @@ func TestEACEngine_getMountPath(t *testing.T) { namespace: tt.fields.namespace, } t.Setenv("MOUNT_ROOT", tt.fields.MountRoot) - wantMountPath := fmt.Sprintf("%s/%s/%s/eac-fuse", tt.fields.MountRoot+"/eac", tt.fields.namespace, e.name) + wantMountPath := fmt.Sprintf("%s/%s/%s/eac-fuse", tt.fields.MountRoot+"/efc", tt.fields.namespace, e.name) if gotMountPath := e.getMountPath(); gotMountPath != wantMountPath { t.Errorf("EACEngine.getMountPoint() = %v, want %v", gotMountPath, wantMountPath) } @@ -321,12 +321,12 @@ func TestEACEngine_getHostMountPath(t *testing.T) { { name: "test", fields: fields{ - name: "eac", + name: "efc", namespace: "default", Log: fake.NullLogger(), MountRoot: "/tmp", }, - wantMountPath: "/tmp/eac/default/eac", + wantMountPath: "/tmp/efc/default/efc", }, } for _, tt := range tests { @@ -361,11 +361,11 @@ func TestEACEngine_getRuntime(t *testing.T) { fields: fields{ runtime: &datav1alpha1.EFCRuntime{ ObjectMeta: metav1.ObjectMeta{ - Name: "eac", + Name: "efc", Namespace: "default", }, }, - name: "eac", + name: "efc", namespace: "default", }, want: &datav1alpha1.EFCRuntime{ @@ -374,7 +374,7 @@ func TestEACEngine_getRuntime(t *testing.T) { APIVersion: "data.fluid.io/v1alpha1", }, ObjectMeta: metav1.ObjectMeta{ - Name: "eac", + Name: "efc", Namespace: "default", }, }, @@ -412,7 +412,7 @@ func Test_getMountRoot(t *testing.T) { }{ { name: "test", - wantPath: "/tmp/eac", + wantPath: "/tmp/efc", }, } for _, tt := range tests { @@ -455,7 +455,7 @@ func TestEACEngine_getWorkerRunningPods(t *testing.T) { Spec: appsv1.StatefulSetSpec{ Selector: &metav1.LabelSelector{ MatchLabels: map[string]string{ - "app": "eac", + "app": "efc", "role": "eac-worker", "fluid.io/dataset": "big-data-spark", }, @@ -475,7 +475,7 @@ func TestEACEngine_getWorkerRunningPods(t *testing.T) { Controller: utilpointer.BoolPtr(true), }}, Labels: map[string]string{ - "app": "eac", + "app": "efc", "role": "eac-worker", "fluid.io/dataset": "big-data-spark", }, @@ -530,7 +530,7 @@ func TestEACEngine_getWorkerRunningPods(t *testing.T) { Spec: appsv1.StatefulSetSpec{ Selector: &metav1.LabelSelector{ MatchLabels: map[string]string{ - "app": "eac", + "app": "efc", "role": "eac-worker", "fluid.io/dataset": "big-data-spark", }, @@ -550,7 +550,7 @@ func TestEACEngine_getWorkerRunningPods(t *testing.T) { Controller: utilpointer.BoolPtr(true), }}, Labels: map[string]string{ - "app": "eac", + "app": "efc", "role": "eac-worker", //"fluid.io/dataset": "big-data-spark", }, @@ -612,7 +612,7 @@ func TestEACEngine_getWorkerRunningPods(t *testing.T) { Client: mockClient, Log: ctrl.Log.WithName(tt.fields.name), } - runtimeInfo, err := base.BuildRuntimeInfo(tt.fields.name, tt.fields.namespace, "eac", datav1alpha1.TieredStore{}) + runtimeInfo, err := base.BuildRuntimeInfo(tt.fields.name, tt.fields.namespace, "efc", datav1alpha1.TieredStore{}) if err != nil { t.Errorf("EACEngine.CheckWorkersReady() error = %v", err) } @@ -642,7 +642,7 @@ func TestEACEngine_getMountInfoAndSecret(t *testing.T) { Spec: datav1alpha1.DatasetSpec{ Mounts: []datav1alpha1.Mount{ { - MountPoint: "eac://volume-uuid.region.nas.aliyuncs.com:/test-fluid-3", + MountPoint: "efc://volume-uuid.region.nas.aliyuncs.com:/test-fluid-3", EncryptOptions: []datav1alpha1.EncryptOption{ { Name: "eac.nas.accessKeyId", @@ -675,7 +675,7 @@ func TestEACEngine_getMountInfoAndSecret(t *testing.T) { Spec: datav1alpha1.DatasetSpec{ Mounts: []datav1alpha1.Mount{ { - MountPoint: "eac://volume-uuid.region.nas.aliyuncs.com:/test-fluid-3", + MountPoint: "efc://volume-uuid.region.nas.aliyuncs.com:/test-fluid-3", }, }, }, @@ -688,7 +688,7 @@ func TestEACEngine_getMountInfoAndSecret(t *testing.T) { Spec: datav1alpha1.DatasetSpec{ Mounts: []datav1alpha1.Mount{ { - MountPoint: "eac://volume-uuid.region.nas.aliyuncs.com:/test-fluid-3", + MountPoint: "efc://volume-uuid.region.nas.aliyuncs.com:/test-fluid-3", EncryptOptions: []datav1alpha1.EncryptOption{ { Name: AccessKeyIDName, diff --git a/pkg/ddc/eac/worker.go b/pkg/ddc/eac/worker.go index e07b652723a..0b87b5ad42c 100644 --- a/pkg/ddc/eac/worker.go +++ b/pkg/ddc/eac/worker.go @@ -39,7 +39,7 @@ func (e *EACEngine) getWorkerSelectors() string { labels := map[string]string{ "release": e.name, common.PodRoleType: workerPodRole, - "app": common.EACRuntime, + "app": common.EFCRuntime, } labelSelector := &metav1.LabelSelector{ MatchLabels: labels, diff --git a/pkg/ddc/eac/worker_test.go b/pkg/ddc/eac/worker_test.go index 6ba0ba0e867..2cc5f18bfa2 100644 --- a/pkg/ddc/eac/worker_test.go +++ b/pkg/ddc/eac/worker_test.go @@ -51,11 +51,11 @@ func TestEACEngine_ShouldSetupWorkers(t *testing.T) { name: "test0", fields: fields{ name: "test0", - namespace: "eac", + namespace: "efc", runtime: &datav1alpha1.EFCRuntime{ ObjectMeta: metav1.ObjectMeta{ Name: "test0", - Namespace: "eac", + Namespace: "efc", }, Status: datav1alpha1.RuntimeStatus{ WorkerPhase: datav1alpha1.RuntimePhaseNone, @@ -69,11 +69,11 @@ func TestEACEngine_ShouldSetupWorkers(t *testing.T) { name: "test1", fields: fields{ name: "test1", - namespace: "eac", + namespace: "efc", runtime: &datav1alpha1.EFCRuntime{ ObjectMeta: metav1.ObjectMeta{ Name: "test1", - Namespace: "eac", + Namespace: "efc", }, Status: datav1alpha1.RuntimeStatus{ WorkerPhase: datav1alpha1.RuntimePhaseNotReady, @@ -87,11 +87,11 @@ func TestEACEngine_ShouldSetupWorkers(t *testing.T) { name: "test2", fields: fields{ name: "test2", - namespace: "eac", + namespace: "efc", runtime: &datav1alpha1.EFCRuntime{ ObjectMeta: metav1.ObjectMeta{ Name: "test2", - Namespace: "eac", + Namespace: "efc", }, Status: datav1alpha1.RuntimeStatus{ WorkerPhase: datav1alpha1.RuntimePhasePartialReady, @@ -105,11 +105,11 @@ func TestEACEngine_ShouldSetupWorkers(t *testing.T) { name: "test3", fields: fields{ name: "test3", - namespace: "eac", + namespace: "efc", runtime: &datav1alpha1.EFCRuntime{ ObjectMeta: metav1.ObjectMeta{ Name: "test3", - Namespace: "eac", + Namespace: "efc", }, Status: datav1alpha1.RuntimeStatus{ WorkerPhase: datav1alpha1.RuntimePhaseReady, @@ -156,7 +156,7 @@ func TestEACEngine_ShouldSetupWorkers(t *testing.T) { } func TestEACEngine_SetupWorkers(t *testing.T) { - runtimeInfo, err := base.BuildRuntimeInfo("eac", "fluid", "eac", datav1alpha1.TieredStore{}) + runtimeInfo, err := base.BuildRuntimeInfo("efc", "fluid", "efc", datav1alpha1.TieredStore{}) if err != nil { t.Errorf("fail to create the runtimeInfo with error %v", err) @@ -321,11 +321,11 @@ func TestEACEngine_CheckWorkersReady(t *testing.T) { name: "test0", fields: fields{ name: "test0", - namespace: "eac", + namespace: "efc", runtime: &datav1alpha1.EFCRuntime{ ObjectMeta: metav1.ObjectMeta{ Name: "test0", - Namespace: "eac", + Namespace: "efc", }, Spec: datav1alpha1.EFCRuntimeSpec{ Replicas: 1, @@ -335,7 +335,7 @@ func TestEACEngine_CheckWorkersReady(t *testing.T) { worker: &appsv1.StatefulSet{ ObjectMeta: metav1.ObjectMeta{ Name: "test0-worker", - Namespace: "eac", + Namespace: "efc", }, Status: appsv1.StatefulSetStatus{ Replicas: 1, @@ -350,11 +350,11 @@ func TestEACEngine_CheckWorkersReady(t *testing.T) { name: "test1", fields: fields{ name: "test1", - namespace: "eac", + namespace: "efc", runtime: &datav1alpha1.EFCRuntime{ ObjectMeta: metav1.ObjectMeta{ Name: "test1", - Namespace: "eac", + Namespace: "efc", }, Spec: datav1alpha1.EFCRuntimeSpec{ Replicas: 1, @@ -364,7 +364,7 @@ func TestEACEngine_CheckWorkersReady(t *testing.T) { worker: &appsv1.StatefulSet{ ObjectMeta: metav1.ObjectMeta{ Name: "test1-worker", - Namespace: "eac", + Namespace: "efc", }, Status: appsv1.StatefulSetStatus{ Replicas: 1, @@ -379,11 +379,11 @@ func TestEACEngine_CheckWorkersReady(t *testing.T) { name: "test2", fields: fields{ name: "test2", - namespace: "eac", + namespace: "efc", runtime: &datav1alpha1.EFCRuntime{ ObjectMeta: metav1.ObjectMeta{ Name: "test2", - Namespace: "eac", + Namespace: "efc", }, Spec: datav1alpha1.EFCRuntimeSpec{ Fuse: datav1alpha1.EFCFuseSpec{}, @@ -395,7 +395,7 @@ func TestEACEngine_CheckWorkersReady(t *testing.T) { worker: &appsv1.StatefulSet{ ObjectMeta: metav1.ObjectMeta{ Name: "test2-worker", - Namespace: "eac", + Namespace: "efc", }, Status: appsv1.StatefulSetStatus{ Replicas: 0, @@ -432,7 +432,7 @@ func TestEACEngine_CheckWorkersReady(t *testing.T) { Client: mockClient, Log: ctrl.Log.WithName(tt.fields.name), } - runtimeInfo, err := base.BuildRuntimeInfo(tt.fields.name, tt.fields.namespace, "eac", datav1alpha1.TieredStore{}) + runtimeInfo, err := base.BuildRuntimeInfo(tt.fields.name, tt.fields.namespace, "efc", datav1alpha1.TieredStore{}) if err != nil { t.Errorf("EACEngine.CheckWorkersReady() error = %v", err) } @@ -465,7 +465,7 @@ func TestEACEngine_GetWorkerSelectors(t *testing.T) { fields: fields{ name: "spark", }, - want: "app=eac,release=spark,role=eac-worker", + want: "app=efc,release=spark,role=eac-worker", }, } for _, tt := range tests { @@ -510,7 +510,7 @@ func TestEACEngine_syncWorkersEndpoints(t *testing.T) { Spec: appsv1.StatefulSetSpec{ Selector: &metav1.LabelSelector{ MatchLabels: map[string]string{ - "app": "eac", + "app": "efc", "role": "eac-worker", "fluid.io/dataset": "big-data-spark", }, @@ -530,7 +530,7 @@ func TestEACEngine_syncWorkersEndpoints(t *testing.T) { Controller: utilpointer.BoolPtr(true), }}, Labels: map[string]string{ - "app": "eac", + "app": "efc", "role": "eac-worker", "fluid.io/dataset": "big-data-spark", }, @@ -585,7 +585,7 @@ func TestEACEngine_syncWorkersEndpoints(t *testing.T) { Spec: appsv1.StatefulSetSpec{ Selector: &metav1.LabelSelector{ MatchLabels: map[string]string{ - "app": "eac", + "app": "efc", "role": "eac-worker", "fluid.io/dataset": "big-data-spark", }, @@ -605,7 +605,7 @@ func TestEACEngine_syncWorkersEndpoints(t *testing.T) { Controller: utilpointer.BoolPtr(true), }}, Labels: map[string]string{ - "app": "eac", + "app": "efc", "role": "eac-worker", "fluid.io/dataset": "big-data-spark", }, @@ -667,7 +667,7 @@ func TestEACEngine_syncWorkersEndpoints(t *testing.T) { Client: mockClient, Log: ctrl.Log.WithName(tt.fields.name), } - runtimeInfo, err := base.BuildRuntimeInfo(tt.fields.name, tt.fields.namespace, "eac", datav1alpha1.TieredStore{}) + runtimeInfo, err := base.BuildRuntimeInfo(tt.fields.name, tt.fields.namespace, "efc", datav1alpha1.TieredStore{}) if err != nil { t.Errorf("EACEngine.CheckWorkersReady() error = %v", err) } diff --git a/pkg/ddc/factory.go b/pkg/ddc/factory.go index 028d3ca65c0..6937e189625 100644 --- a/pkg/ddc/factory.go +++ b/pkg/ddc/factory.go @@ -40,7 +40,7 @@ func init() { "goosefs": goosefs.Build, "juicefs": juicefs.Build, "thin": thin.Build, - "eac": eac.Build, + "efc": eac.Build, } deploy.SetPrecheckFunc(map[string]deploy.CheckFunc{ @@ -49,7 +49,7 @@ func init() { "juicefsruntime-controller": juicefs.Precheck, "goosefsruntime-controller": goosefs.Precheck, "thinruntime-controller": thin.Precheck, - "eacruntime-controller": eac.Precheck, + "efcruntime-controller": eac.Precheck, }) } @@ -61,7 +61,7 @@ func CreateEngine(id string, ctx cruntime.ReconcileRequestContext) (engine base. if buildeFunc, found := buildFuncMap[ctx.RuntimeType]; found { engine, err = buildeFunc(id, ctx) } else { - err = fmt.Errorf("failed to build the engine due to the type %s is not found", ctx.NamespacedName) + err = fmt.Errorf("failed to build the engine due to the type %s is not found", ctx.RuntimeType) } return diff --git a/pkg/ddc/thin/referencedataset/cm.go b/pkg/ddc/thin/referencedataset/cm.go index 05f340aad0f..87accea9906 100644 --- a/pkg/ddc/thin/referencedataset/cm.go +++ b/pkg/ddc/thin/referencedataset/cm.go @@ -129,10 +129,10 @@ func (e *ReferenceDatasetEngine) createConfigMapForRefDataset(client client.Clie if err != nil { return err } - case common.EACRuntime: + case common.EFCRuntime: // TODO: EFCRuntime needs worker-endpoint configmap which should be synced timely for ECI mode. // Currently EFCRuntime only supports CSI mode, so do nothing here. - e.Log.Info("Skip createConfigMapForRefDataset because the mountedRuntimeType=EAC", "name", e.name, "namespace", e.namespace) + e.Log.Info("Skip createConfigMapForRefDataset because the mountedRuntimeType=EFC", "name", e.name, "namespace", e.namespace) case common.ThinRuntime: runtimesetConfigMapName := mountedRuntimeName + "-runtimeset" err := kubeclient.CopyConfigMap(client, types.NamespacedName{Name: runtimesetConfigMapName, Namespace: mountedRuntimeNamespace}, diff --git a/pkg/utils/fluid.go b/pkg/utils/fluid.go index 210771db2e8..4bd11b536f1 100644 --- a/pkg/utils/fluid.go +++ b/pkg/utils/fluid.go @@ -28,7 +28,7 @@ func IsPodManagedByFluid(pod *corev1.Pod) bool { common.GooseFSRuntime, common.JuiceFSRuntime, common.ThinRuntime, - common.EACRuntime} + common.EFCRuntime} if _, ok := pod.Labels[common.PodRoleType]; ok && pod.Labels[common.PodRoleType] == common.DataloadPod { return true } diff --git a/pkg/utils/ufs_path_builder_test.go b/pkg/utils/ufs_path_builder_test.go index 5ceff96cccc..3e7c0b9d3ce 100644 --- a/pkg/utils/ufs_path_builder_test.go +++ b/pkg/utils/ufs_path_builder_test.go @@ -5,7 +5,7 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,