Agent can now poll osupgrade resources from cluster

This commit is contained in:
2026-04-02 00:07:32 +08:00
parent 145b0a4662
commit e7b8e406a8
7 changed files with 32 additions and 14 deletions

View File

@@ -35,7 +35,7 @@ func NewCmdAgent(flags *genericclioptions.ConfigFlags) *cobra.Command {
rendered := templates.DefaultMonoKSConfig(vals)
cfg = &rendered
klog.InfoS("starting init", "node", cfg.Spec.NodeName, "envFile", envFile)
klog.InfoS("starting agent", "node", cfg.Spec.NodeName, "envFile", envFile)
clients, err := kube.NewClients(flags)
if err != nil {

View File

@@ -14,7 +14,7 @@ func NewCmdVersion() *cobra.Command {
Short: "Print the version information",
RunE: func(cmd *cobra.Command, _ []string) error {
_, err := fmt.Fprintln(cmd.OutOrStdout(), buildInfo.Version)
_, err := fmt.Fprintln(cmd.OutOrStdout(), fmt.Sprintf("%s %s(%s)", buildInfo.Version, buildInfo.GitRevision, buildInfo.Timestamp))
return err
},
}