Skip to content

Commit cea22ec

Browse files
committed
remove custom get pod function now that we are using controller-runtime's manager
1 parent b39f8dd commit cea22ec

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

cns/restserver/ibdevices.go

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -120,21 +120,6 @@ func respond(opName string, w http.ResponseWriter, httpStatusCode int, cnsCode t
120120
logger.Response(opName, response, cnsCode, errors.New(fmt.Sprintf("HTTP: %v CNSCode:%v Response: %v", httpStatusCode, cnsCode, response)))
121121
}
122122

123-
func getPod(ctx context.Context, k8sClient client.Client, podName, podNamespace string) (*v1.Pod, error) {
124-
// Create a NamespacedName for the pod
125-
podNamespacedName := k8stypes.NamespacedName{
126-
Namespace: podNamespace,
127-
Name: podName,
128-
}
129-
130-
// Try to get the pod from the cluster
131-
pod := &v1.Pod{}
132-
if err := k8sClient.Get(ctx, podNamespacedName, pod); err != nil {
133-
return nil, err
134-
}
135-
136-
return pod, nil
137-
}
138123
func podHasNUMALabel(pod *v1.Pod) bool {
139124
if pod == nil || pod.Labels == nil {
140125
return false

0 commit comments

Comments
 (0)