From 9dedba0c39145ecae6ac3d51606b0e861c9e78af Mon Sep 17 00:00:00 2001 From: NimbleArchitect <56797391+NimbleArchitect@users.noreply.github.com> Date: Mon, 19 Sep 2022 11:15:04 +0100 Subject: [PATCH] fixed cpu and memory should not show init containers by default --- pkg/plugin/builder.go | 4 ++++ pkg/plugin/resources.go | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) 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{}