@@ -123,10 +123,31 @@ func isPipelineBuild(obj runtime.Object) (bool, *buildv1.BuildConfig, bool, *bui
123123// resource a user requested to view its logs and creates the appropriate logOptions
124124// object for it.
125125func (o * LogsOptions ) Complete (f kcmdutil.Factory , cmd * cobra.Command , args []string ) error {
126+ // manually bind all flag values from the upstream command
127+ // TODO: once the upstream command supports binding flags
128+ // by outside callers, this will no longer be needed.
129+ o .KubeLogOptions .AllContainers = kcmdutil .GetFlagBool (cmd , "all-containers" )
130+ o .KubeLogOptions .Container = kcmdutil .GetFlagString (cmd , "container" )
131+ o .KubeLogOptions .Selector = kcmdutil .GetFlagString (cmd , "selector" )
132+ o .KubeLogOptions .Follow = kcmdutil .GetFlagBool (cmd , "follow" )
133+ o .KubeLogOptions .Previous = kcmdutil .GetFlagBool (cmd , "previous" )
134+ o .KubeLogOptions .Timestamps = kcmdutil .GetFlagBool (cmd , "timestamps" )
135+ o .KubeLogOptions .SinceTime = kcmdutil .GetFlagString (cmd , "since-time" )
136+ o .KubeLogOptions .LimitBytes = kcmdutil .GetFlagInt64 (cmd , "limit-bytes" )
137+ o .KubeLogOptions .Tail = kcmdutil .GetFlagInt64 (cmd , "tail" )
138+ o .KubeLogOptions .SinceSeconds = kcmdutil .GetFlagDuration (cmd , "since" )
139+ o .KubeLogOptions .ContainerNameSpecified = cmd .Flag ("container" ).Changed
140+
126141 if err := o .KubeLogOptions .Complete (f , cmd , args ); err != nil {
127142 return err
128143 }
144+
129145 var err error
146+ o .KubeLogOptions .GetPodTimeout , err = kcmdutil .GetPodRunningTimeoutFlag (cmd )
147+ if err != nil {
148+ return err
149+ }
150+
130151 o .Namespace , _ , err = f .ToRawKubeConfigLoader ().Namespace ()
131152 if err != nil {
132153 return err
0 commit comments