mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-08-02 00:57:45 +00:00
👕 Remove unused getK8sTapManagerErrorText
method
This commit is contained in:
parent
5f4a856c5e
commit
90294e32c1
@ -135,19 +135,6 @@ func printNoPodsFoundSuggestion(targetNamespaces []string) {
|
|||||||
log.Warn().Msg(fmt.Sprintf("Did not find any currently running pods that match the regex argument, %s will automatically target matching pods if any are created later%s", misc.Software, suggestionStr))
|
log.Warn().Msg(fmt.Sprintf("Did not find any currently running pods that match the regex argument, %s will automatically target matching pods if any are created later%s", misc.Software, suggestionStr))
|
||||||
}
|
}
|
||||||
|
|
||||||
func getK8sTapManagerErrorText(err kubernetes.K8sTapManagerError) string {
|
|
||||||
switch err.TapManagerReason {
|
|
||||||
case kubernetes.TapManagerPodListError:
|
|
||||||
return fmt.Sprintf("Failed to update currently targeted pods: %v", err.OriginalError)
|
|
||||||
case kubernetes.TapManagerPodWatchError:
|
|
||||||
return fmt.Sprintf("Error occured in K8s pod watch: %v", err.OriginalError)
|
|
||||||
case kubernetes.TapManagerWorkerUpdateError:
|
|
||||||
return fmt.Sprintf("Error updating worker: %v", err.OriginalError)
|
|
||||||
default:
|
|
||||||
return fmt.Sprintf("Unknown error occured in K8s tap manager: %v", err.OriginalError)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func watchHubPod(ctx context.Context, kubernetesProvider *kubernetes.Provider, cancel context.CancelFunc) {
|
func watchHubPod(ctx context.Context, kubernetesProvider *kubernetes.Provider, cancel context.CancelFunc) {
|
||||||
podExactRegex := regexp.MustCompile(fmt.Sprintf("^%s$", kubernetes.HubPodName))
|
podExactRegex := regexp.MustCompile(fmt.Sprintf("^%s$", kubernetes.HubPodName))
|
||||||
podWatchHelper := kubernetes.NewPodWatchHelper(kubernetesProvider, podExactRegex)
|
podWatchHelper := kubernetes.NewPodWatchHelper(kubernetesProvider, podExactRegex)
|
||||||
|
Loading…
Reference in New Issue
Block a user