Skip to content

Commit

Permalink
refactor(EACRuntime): remane eacruntime-controller to efcruntime-cont…
Browse files Browse the repository at this point in the history
…roller

Signed-off-by: zhanyi <[email protected]>
  • Loading branch information
yangjun289519474 committed Apr 14, 2023
1 parent 4288c01 commit 1430c2a
Show file tree
Hide file tree
Showing 46 changed files with 346 additions and 345 deletions.
10 changes: 5 additions & 5 deletions charts/efc/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 -}}

Expand All @@ -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 -}}
Expand All @@ -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 */}}
Expand All @@ -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 }}
Expand Down
24 changes: 12 additions & 12 deletions charts/efc/templates/fuse/daemonset.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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:
Expand Down
32 changes: 16 additions & 16 deletions charts/efc/templates/master/statefulset.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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:
Expand All @@ -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
Expand Down Expand Up @@ -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" ]
Expand All @@ -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:
Expand Down
10 changes: 5 additions & 5 deletions charts/efc/templates/worker/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -20,5 +20,5 @@ metadata:
uid: {{ .Values.owner.uid }}
{{- end }}
data:
eac-worker-endpoints.json: |
efc-worker-endpoints.json: |
{"containerendpoints":[]}
18 changes: 9 additions & 9 deletions charts/efc/templates/worker/statefulset.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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:
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,19 +65,19 @@ spec:
value: {{ .Values.runtime.syncRetryDuration | quote }}
{{- end }}
{{- if .Values.runtime.efc.init.image }}
- name: EAC_INIT_FUSE_IMAGE_ENV
- name: EFC_INIT_FUSE_IMAGE_ENV
value: {{ .Values.runtime.efc.init.image | quote }}
{{- end }}
{{- if .Values.runtime.efc.master.image }}
- name: EAC_MASTER_IMAGE_ENV
- name: EFC_MASTER_IMAGE_ENV
value: {{ .Values.runtime.efc.master.image | quote }}
{{- end }}
{{- if .Values.runtime.efc.worker.image }}
- name: EAC_WORKER_IMAGE_ENV
- name: EFC_WORKER_IMAGE_ENV
value: {{ .Values.runtime.efc.worker.image | quote }}
{{- end }}
{{- if .Values.runtime.efc.fuse.image }}
- name: EAC_FUSE_IMAGE_ENV
- name: EFC_FUSE_IMAGE_ENV
value: {{ .Values.runtime.efc.fuse.image | quote }}
{{- end }}
ports:
Expand Down
2 changes: 1 addition & 1 deletion cmd/efc/app/efc.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func handle() {
MetricsBindAddress: metricsAddr,
LeaderElection: enableLeaderElection,
LeaderElectionNamespace: leaderElectionNamespace,
LeaderElectionID: "eac.data.fluid.io",
LeaderElectionID: "efc.data.fluid.io",
Port: 9443,
})
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions docs/zh/troubleshooting/debug-fuse.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
```
Expand Down
64 changes: 0 additions & 64 deletions pkg/common/eac.go

This file was deleted.

Loading

0 comments on commit 1430c2a

Please sign in to comment.