Skip to content

Commit

Permalink
Removing deprecated --list-images flag on init command
Browse files Browse the repository at this point in the history
  • Loading branch information
knabben committed Jan 3, 2023
1 parent a95b91c commit 97dac11
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions cmd/clusterctl/cmd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ limitations under the License.
package cmd

import (
"fmt"
"time"

"github.com/spf13/cobra"
Expand All @@ -35,7 +34,6 @@ type initOptions struct {
ipamProviders []string
runtimeExtensionProviders []string
targetNamespace string
listImages bool
validate bool
waitProviders bool
waitProviderTimeout int
Expand Down Expand Up @@ -114,10 +112,6 @@ func init() {
initCmd.Flags().BoolVar(&initOpts.validate, "validate", true,
"If true, clusterctl will validate that the deployments will succeed on the management cluster.")

initCmd.Flags().BoolVar(&initOpts.listImages, "list-images", false,
"Lists the container images required for initializing the management cluster (without actually installing the providers)")
_ = initCmd.Flags().MarkDeprecated("list-images", "use 'clusterctl init list-images' instead.")

initCmd.AddCommand(initListImagesCmd)
RootCmd.AddCommand(initCmd)
}
Expand All @@ -143,18 +137,6 @@ func runInit() error {
IgnoreValidationErrors: !initOpts.validate,
}

if initOpts.listImages {
images, err := c.InitImages(options)
if err != nil {
return err
}

for _, i := range images {
fmt.Println(i)
}
return nil
}

if _, err := c.Init(options); err != nil {
return err
}
Expand Down

0 comments on commit 97dac11

Please sign in to comment.