|
|
|
@ -36,6 +36,7 @@ var resumeCmd = &cobra.Command{
|
|
|
|
|
|
|
|
|
|
type ResumeFlags struct {
|
|
|
|
|
all bool
|
|
|
|
|
wait bool
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var resumeArgs ResumeFlags
|
|
|
|
@ -43,6 +44,8 @@ var resumeArgs ResumeFlags
|
|
|
|
|
func init() {
|
|
|
|
|
resumeCmd.PersistentFlags().BoolVarP(&resumeArgs.all, "all", "", false,
|
|
|
|
|
"resume all resources in that namespace")
|
|
|
|
|
resumeCmd.PersistentFlags().BoolVarP(&resumeArgs.wait, "wait", "", false,
|
|
|
|
|
"waits for one resource to reconcile before moving to the next one")
|
|
|
|
|
rootCmd.AddCommand(resumeCmd)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -107,6 +110,7 @@ func (resume resumeCommand) run(cmd *cobra.Command, args []string) error {
|
|
|
|
|
|
|
|
|
|
logger.Successf("%s resumed", resume.humanKind)
|
|
|
|
|
|
|
|
|
|
if resumeArgs.wait || !resumeArgs.all {
|
|
|
|
|
namespacedName := types.NamespacedName{
|
|
|
|
|
Name: resume.list.resumeItem(i).asClientObject().GetName(),
|
|
|
|
|
Namespace: *kubeconfigArgs.Namespace,
|
|
|
|
@ -121,6 +125,7 @@ func (resume resumeCommand) run(cmd *cobra.Command, args []string) error {
|
|
|
|
|
logger.Successf("%s reconciliation completed", resume.kind)
|
|
|
|
|
logger.Successf(resume.list.resumeItem(i).successMessage())
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return nil
|
|
|
|
|
}
|
|
|
|
|