Commit 9c956c21 authored by Derek Carr's avatar Derek Carr

Allow the usage of kubectl logs with label selector and container name

parent 3f941ac1
...@@ -187,9 +187,6 @@ func (o *LogsOptions) Complete(f cmdutil.Factory, out io.Writer, cmd *cobra.Comm ...@@ -187,9 +187,6 @@ func (o *LogsOptions) Complete(f cmdutil.Factory, out io.Writer, cmd *cobra.Comm
if logOptions.Follow { if logOptions.Follow {
return cmdutil.UsageError(cmd, "only one of follow (-f) or selector (-l) is allowed") return cmdutil.UsageError(cmd, "only one of follow (-f) or selector (-l) is allowed")
} }
if len(logOptions.Container) != 0 {
return cmdutil.UsageError(cmd, "a container cannot be specified when using a selector (-l)")
}
if logOptions.TailLines == nil { if logOptions.TailLines == nil {
logOptions.TailLines = &selectorTail logOptions.TailLines = &selectorTail
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment