File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,15 +2,13 @@ package cmd
22
33import (
44 "context"
5- "fmt"
65 "log/slog"
76 "os"
87 "path/filepath"
98 "time"
109
1110 "github.com/cybozu-go/necoperf/internal/client"
1211 "github.com/spf13/cobra"
13- corev1 "k8s.io/api/core/v1"
1412)
1513
1614var config struct {
@@ -22,16 +20,6 @@ var config struct {
2220 timeout time.Duration
2321}
2422
25- func isPodReady (pod * corev1.Pod ) bool {
26- for _ , cond := range pod .Status .Conditions {
27- if cond .Type != corev1 .PodReady {
28- continue
29- }
30- return cond .Status == corev1 .ConditionTrue
31- }
32- return false
33- }
34-
3523func NewProfileCommand () * cobra.Command {
3624 cmd := & cobra.Command {
3725 Use : "profile" ,
@@ -59,9 +47,6 @@ func NewProfileCommand() *cobra.Command {
5947 if err != nil {
6048 return err
6149 }
62- if ! isPodReady (pod ) {
63- return fmt .Errorf ("pod %s is not ready" , pod .Name )
64- }
6550 containerID , err := ds .GetContainerID (pod , config .containerName )
6651 if err != nil {
6752 return err
You can’t perform that action at this time.
0 commit comments