You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Wait for the job `some-job` to complete, the service `some-service` to have all available pods and the pod `some-pod-88bb5f7bb-wx4f7` to be ready and available.
32
+
33
+
The program will also wait when a service does not exist yet.
// rootCmd represents the base command when called without any subcommands
@@ -40,7 +42,7 @@ var rootCmd = &cobra.Command{
40
42
This is an implementation of k8s-wait-for that allows you to wait for multiple items in one process.
41
43
This uses informers to get the status updates for all the items that this application is waiting for.
42
44
43
-
You can omit the NAMESPACE and KIND, they default to the value of the --namespace flag and pod respectively. Supported string for KIND are service, job and pod.`,
45
+
You can omit the NAMESPACE and KIND, they default to the value of the --namespace flag and 'pod' respectively. Supported strings for KIND are service, job and pod.`,
rootCmd.Flags().BoolP("version", "v", false, "Display version info")
61
-
62
-
rootCmd.Flags().Bool("no-collapse", false, "Do not collapse the status tree for done subtrees")
63
-
64
-
rootCmd.Flags().Bool("no-tree", false, "Do not print the status as a tree")
62
+
WaitForConfigFlags=flags.NewConfigFlags()
65
63
66
-
rootCmd.PersistentFlags().DurationP("timeout", "t", time.Duration(600*time.Second), "The length of time to wait before ending watch, zero means never. Any other values should contain a corresponding time unit (e.g. 1s, 2m, 3h). Default is 10 minutes")
flags.DurationVarP(f.Timeout, "timeout", "t", *f.Timeout, "The length of time to wait before ending watch, zero means never. Any other values should contain a corresponding time unit (e.g. 1s, 2m, 3h)")
48
+
}
49
+
50
+
iff.PrintVersion!=nil {
51
+
flags.BoolVarP(f.PrintVersion, "version", "v", *f.PrintVersion, "Display version info")
52
+
}
53
+
54
+
iff.PrintTree!=nil {
55
+
flags.BoolVar(f.PrintTree, "print-tree", *f.PrintTree, "Print the status as a tree")
56
+
}
57
+
58
+
iff.PrintCollapsedTree!=nil {
59
+
flags.BoolVar(f.PrintCollapsedTree, "print-collapsed-tree", *f.PrintCollapsedTree, "Collapse the status tree for done subtrees")
0 commit comments