From f78a6ded2dcb968fe6262220aa30dbbcd719da48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=AA=9B=E5=AA=9B231840070?= <231840070@smail.nju.edu.cn> Date: Mon, 29 Jun 2026 19:34:45 +0800 Subject: [PATCH] Add Notation to getMasterStatefulset in fluid/pkg/ddc/alluxio/utils.go. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 赵媛媛231840070 <231840070@smail.nju.edu.cn> --- pkg/ddc/alluxio/utils.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkg/ddc/alluxio/utils.go b/pkg/ddc/alluxio/utils.go index faf794e263b..cd33da4ad6e 100644 --- a/pkg/ddc/alluxio/utils.go +++ b/pkg/ddc/alluxio/utils.go @@ -75,6 +75,16 @@ func (e *AlluxioEngine) getMasterPod(name string, namespace string) (pod *v1.Pod return pod, err } +// getMasterStatefulset retrieves the Alluxio Master StatefulSet with the specified name +// and namespace from the Kubernetes cluster using the embedded client. +// +// Parameters: +// - name: the name of the StatefulSet resource. +// - namespace: the Kubernetes namespace where the StatefulSet resides. +// +// Returns: +// - master: a pointer to the appsv1.StatefulSet object if found; nil on error. +// - err: non-nil if the retrieval fails (e.g., resource not found, network issue). func (e *AlluxioEngine) getMasterStatefulset(name string, namespace string) (master *appsv1.StatefulSet, err error) { master = &appsv1.StatefulSet{} err = e.Client.Get(context.TODO(), types.NamespacedName{