Migrate the webhook-certgen program to inside ingress repo (#7475)

This commit is contained in:
Ricardo Katz 2021-08-10 17:22:40 -03:00 committed by GitHub
parent 9a9ad47857
commit 492c7b0d94
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 1910 additions and 0 deletions

View 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)
}