-
Notifications
You must be signed in to change notification settings - Fork 4
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
Conversation
857242f
to
89d96a2
Compare
@npepinpe ping? :) |
There was a problem hiding this 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") |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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.
This adds two commands that allow taking a backup and waiting for a backup to complete or fail