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
print.WarningStatusEvent(os.Stdout, "In future releases, this command will only query the \"default\" namespace by default. Please use the -n (namespace) flag, for specific namespace, or -A (all-namespaces) flag for all namespaces.")
38
+
ifallNamespaces {
39
+
resourceNamespace=meta_v1.NamespaceAll
40
+
} elseifresourceNamespace=="" {
41
+
resourceNamespace=meta_v1.NamespaceAll
42
+
print.WarningStatusEvent(os.Stdout, "From next release(or after 2 releases), behavior can be changed to query only \"default\" namespace.")
43
+
}
44
+
ifcomponentsName!="" {
45
+
print.WarningStatusEvent(os.Stdout, "From next release(or after 2 releases), behavior can be changed to treat it as \"namespace\".")
print.WarningStatusEvent(os.Stdout, "In future releases, this command will only query the \"default\" namespace by default. Please use the -n (namespace) flag, for specific namespace, or -A (all-namespaces) flag for all namespaces.")
38
+
ifallNamespaces {
39
+
resourceNamespace=meta_v1.NamespaceAll
40
+
} elseifresourceNamespace=="" {
41
+
resourceNamespace=meta_v1.NamespaceAll
42
+
print.WarningStatusEvent(os.Stdout, "From next release(or after 2 releases), behavior can be changed to query only \"default\" namespace.")
43
+
}
44
+
ifconfigurationName!="" {
45
+
print.WarningStatusEvent(os.Stdout, "From next release(or after 2 releases), behavior can be changed to treat it as \"namespace\".")
print.WarningStatusEvent(os.Stdout, "In future releases, this command will only query the \"default\" namespace by default. Please use the -n (namespace) flag, for specific namespace, or -A (all-namespaces) flag for all namespaces.")
82
+
ifallNamespaces {
83
+
resourceNamespace=meta_v1.NamespaceAll
84
+
} elseifresourceNamespace=="" {
85
+
resourceNamespace=meta_v1.NamespaceAll
86
+
print.WarningStatusEvent(os.Stdout, "From next release(or after 2 releases), behavior can be changed to query only \"default\" namespace.")
87
+
}
88
+
89
+
list, err:=kubernetes.List(resourceNamespace)
74
90
iferr!=nil {
75
91
print.FailureStatusEvent(os.Stderr, err.Error())
76
92
os.Exit(1)
@@ -95,7 +111,9 @@ dapr list -k
95
111
}
96
112
97
113
funcinit() {
114
+
ListCmd.Flags().BoolVarP(&allNamespaces, "all-namespaces", "A", false, "If true, list all Dapr pods in all namespaces")
98
115
ListCmd.Flags().BoolVarP(&kubernetesMode, "kubernetes", "k", false, "List all Dapr pods in a Kubernetes cluster")
116
+
ListCmd.Flags().StringVarP(&resourceNamespace, "namespace", "", "", "List define namespace pod in a Kubernetes cluster")
99
117
ListCmd.Flags().StringVarP(&outputFormat, "output", "o", "", "The output format of the list. Valid values are: json, yaml, or table (default)")
100
118
ListCmd.Flags().BoolP("help", "h", false, "Print this help message")
0 commit comments