mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-15 22:20:51 +00:00
Add event listing and printing to kubecfg
This commit is contained in:
@@ -46,6 +46,7 @@ var (
|
||||
preventSkew = flag.Bool("expect_version_match", false, "Fail if server's version doesn't match own version.")
|
||||
config = flag.String("c", "", "Path or URL to the config file, or '-' to read from STDIN")
|
||||
selector = flag.String("l", "", "Selector (label query) to use for listing")
|
||||
fieldSelector = flag.String("fields", "", "Selector (field query) to use for listing")
|
||||
updatePeriod = flag.Duration("u", 60*time.Second, "Update interval period")
|
||||
portSpec = flag.String("p", "", "The port spec, comma-separated list of <external>:<internal>,...")
|
||||
servicePort = flag.Int("s", -1, "If positive, create and run a corresponding service on this port, only used with 'run'")
|
||||
@@ -376,6 +377,9 @@ func executeAPIRequest(ctx api.Context, method string, c *client.Client) bool {
|
||||
if len(*selector) > 0 {
|
||||
r.ParseSelectorParam("labels", *selector)
|
||||
}
|
||||
if len(*fieldSelector) > 0 {
|
||||
r.ParseSelectorParam("fields", *fieldSelector)
|
||||
}
|
||||
if setBody {
|
||||
if len(version) > 0 {
|
||||
data := readConfig(storage, c.RESTClient.Codec)
|
||||
|
Reference in New Issue
Block a user