diff --git a/pkg/plugin/builder.go b/pkg/plugin/builder.go index 2f64691..fe5350e 100644 --- a/pkg/plugin/builder.go +++ b/pkg/plugin/builder.go @@ -109,6 +109,10 @@ func (b *RowBuilder) SetFlagsFrom(commonFlagList commonFlags) { b.columnByNames = strings.Split(columnNames, ",") } + if commonFlagList.showInitContainers { + b.ShowInitContainers = true + } + } func (b RowBuilder) HasStdinChanged() (bool, error) { diff --git a/pkg/plugin/resources.go b/pkg/plugin/resources.go index b84315d..e8241d3 100644 --- a/pkg/plugin/resources.go +++ b/pkg/plugin/resources.go @@ -63,7 +63,6 @@ func Resources(cmd *cobra.Command, kubeFlags *genericclioptions.ConfigFlags, arg builder := RowBuilder{} builder.LoopSpec = true - builder.ShowInitContainers = true builder.PodName = args connect := Connector{}