command
This commit is contained in:
32
internal/kind.go
Normal file
32
internal/kind.go
Normal file
@@ -0,0 +1,32 @@
|
||||
package internal
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"oc-k8s/utils"
|
||||
)
|
||||
|
||||
func Help_Kind() {
|
||||
fmt.Println(`
|
||||
Kind commands: oc-k8s <action> kind
|
||||
install - Install kind
|
||||
help - Show this help message
|
||||
|
||||
Usage:
|
||||
oc-k8s install kind [arch] [version]
|
||||
arch - Arch of OS (required)
|
||||
kind_version - version of kind (required)
|
||||
oc-k8s help values `)
|
||||
}
|
||||
|
||||
func Install_Kind(args ...string) error {
|
||||
arch := "linux-amd64"
|
||||
version := "v0.30.0"
|
||||
if len(args) > 0 {
|
||||
arch = args[0]
|
||||
}
|
||||
if len(args) > 1 {
|
||||
version = args[1]
|
||||
}
|
||||
utils.Exec("curl -Lo kind-linux-amd64 https://kind.sigs.k8s.io/dl/" + version + "/kind-" + arch)
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user