mirror of
https://github.com/lukaszraczylo/kubemirror.git
synced 2026-07-07 23:34:33 +00:00
fix(cmd): log the actual build version on startup
The startup log hardcoded version="dev", so release builds always reported dev. Use the ldflags-set Version variable. Also modernise interface{} to any.
This commit is contained in:
@@ -134,7 +134,7 @@ func main() {
|
|||||||
ctrl.SetLogger(zap.New(zap.UseFlagOptions(&opts)))
|
ctrl.SetLogger(zap.New(zap.UseFlagOptions(&opts)))
|
||||||
|
|
||||||
setupLog.Info("starting kubemirror controller",
|
setupLog.Info("starting kubemirror controller",
|
||||||
"version", "dev",
|
"version", Version,
|
||||||
"maxTargets", maxTargets,
|
"maxTargets", maxTargets,
|
||||||
"workers", workerThreads,
|
"workers", workerThreads,
|
||||||
)
|
)
|
||||||
@@ -207,7 +207,7 @@ func main() {
|
|||||||
// This can reduce memory consumption by 50-70% by removing:
|
// This can reduce memory consumption by 50-70% by removing:
|
||||||
// - managedFields (often several KB per resource)
|
// - managedFields (often several KB per resource)
|
||||||
// - large annotations like kubectl.kubernetes.io/last-applied-configuration
|
// - large annotations like kubectl.kubernetes.io/last-applied-configuration
|
||||||
transformFunc := func(obj interface{}) (interface{}, error) {
|
transformFunc := func(obj any) (any, error) {
|
||||||
// Type assert to unstructured
|
// Type assert to unstructured
|
||||||
u, ok := obj.(*unstructured.Unstructured)
|
u, ok := obj.(*unstructured.Unstructured)
|
||||||
if !ok {
|
if !ok {
|
||||||
|
|||||||
Reference in New Issue
Block a user