Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add backup take and backup wait commands #201

Merged
merged 4 commits into from
Oct 21, 2022

Conversation

lenaschoenburg
Copy link
Member

This adds two commands that allow taking a backup and waiting for a backup to complete or fail

@lenaschoenburg
Copy link
Member Author

@npepinpe ping? :)

Copy link
Member

@npepinpe npepinpe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

rootCmd.AddCommand(backupCommand)

backupCommand.AddCommand(takeBackupCommand)
takeBackupCommand.Flags().StringVar(&backupId, "backupId", strconv.FormatInt(time.Now().UnixMilli(), 10), "optionally specify the backup id to use, uses the current timestamp by default")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔧 Unless we plan to have commands without the flag, it could simply be on the general backupCommand, and the child commands will inherit it I think.

}

port := 9600
closePortForward, err := k8Client.GatewayPortForward(port, port)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💭 I think almost everywhere we act the same (e.g. panic when we can't port forward). Wondering if it's useful to have it return an error at all, or if we should just have a function MustForwardGatewayPort which returns either a close function or explodes anyway.

@lenaschoenburg lenaschoenburg merged commit 90b3cae into main Oct 21, 2022
@lenaschoenburg lenaschoenburg deleted the os-zbchaos-backup branch October 21, 2022 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants