mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-06 07:57:07 +00:00
* Added appropriate logging levels to log.Info() calls wherever necessary Signed-off-by: anutosh491 <andersonbhat491@gmail.com> * Changed logging levels to 2 Signed-off-by: anutosh491 <andersonbhat491@gmail.com> Signed-off-by: anutosh491 <andersonbhat491@gmail.com> Co-authored-by: shuting <shuting@nirmata.com>
20 lines
481 B
Go
20 lines
481 B
Go
package version
|
|
|
|
import (
|
|
"github.com/go-logr/logr"
|
|
)
|
|
|
|
// These fields are set during an official build
|
|
// Global vars set from command-line arguments
|
|
var (
|
|
BuildVersion = "--"
|
|
BuildHash = "--"
|
|
BuildTime = "--"
|
|
)
|
|
|
|
// PrintVersionInfo displays the kyverno version - git version
|
|
func PrintVersionInfo(log logr.Logger) {
|
|
log.V(2).Info("Kyverno", "Version", BuildVersion)
|
|
log.V(2).Info("Kyverno", "BuildHash", BuildHash)
|
|
log.V(2).Info("Kyverno", "BuildTime", BuildTime)
|
|
}
|