Migrate the webhook-certgen program to inside ingress repo (#7475)
This commit is contained in:
parent
9a9ad47857
commit
492c7b0d94
18 changed files with 1910 additions and 0 deletions
25
images/kube-webhook-certgen/rootfs/cmd/version.go
Normal file
25
images/kube-webhook-certgen/rootfs/cmd/version.go
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
package cmd
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"runtime"
|
||||
|
||||
"github.com/jet/kube-webhook-certgen/core"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
var version = &cobra.Command{
|
||||
Use: "version",
|
||||
Short: "Prints the CLI version information",
|
||||
Run: versionCmdRun,
|
||||
}
|
||||
|
||||
func versionCmdRun(cmd *cobra.Command, args []string) {
|
||||
fmt.Printf("%s\n", core.Version)
|
||||
fmt.Printf("build %s\n", core.BuildTime)
|
||||
fmt.Printf("%s\n", runtime.Version())
|
||||
}
|
||||
|
||||
func init() {
|
||||
rootCmd.AddCommand(version)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue