mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-01-03 11:45:20 +00:00
27
cmd/velero-helper/velero-helper.go
Normal file
27
cmd/velero-helper/velero-helper.go
Normal file
@@ -0,0 +1,27 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"time"
|
||||
)
|
||||
|
||||
const (
|
||||
// workingModePause indicates it is for general purpose to hold the pod under running state
|
||||
workingModePause = "pause"
|
||||
)
|
||||
|
||||
func main() {
|
||||
if len(os.Args) < 2 {
|
||||
fmt.Fprintln(os.Stderr, "ERROR: at least one argument must be provided, the working mode")
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
switch os.Args[1] {
|
||||
case workingModePause:
|
||||
time.Sleep(time.Duration(1<<63 - 1))
|
||||
default:
|
||||
fmt.Fprintln(os.Stderr, "ERROR: wrong working mode provided")
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user