Skip to content

Commit d7fd13d

Browse files
committed
add base name in node label
1 parent 4ee28fd commit d7fd13d

File tree

5 files changed

+6
-4
lines changed

5 files changed

+6
-4
lines changed

cmd/module-controller/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import (
1919
"errors"
2020
"fmt"
2121
"github.com/koupleless/module_controller/common/zaplogger"
22+
"github.com/koupleless/module_controller/report_server"
2223
"github.com/koupleless/virtual-kubelet/vnode_controller"
2324
"os"
2425
"os/signal"
@@ -32,7 +33,6 @@ import (
3233
"github.com/koupleless/module_controller/controller/module_deployment_controller"
3334
"github.com/koupleless/module_controller/module_tunnels/koupleless_http_tunnel"
3435
"github.com/koupleless/module_controller/module_tunnels/koupleless_mqtt_tunnel"
35-
"github.com/koupleless/module_controller/report_server"
3636
"github.com/koupleless/virtual-kubelet/common/tracker"
3737
"github.com/koupleless/virtual-kubelet/common/utils"
3838
vkModel "github.com/koupleless/virtual-kubelet/model"

common/model/model.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ type BaseMetadata struct {
1616
Identity string `json:"identity"`
1717
Version string `json:"version"` // Version identifier
1818
ClusterName string `json:"clusterName"` // ClusterName of the resource communicate with base
19+
Name string `json:"name"` // Name of the base
1920
}
2021

2122
// BaseStatus is the data of base heart beat.

common/utils/utils.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ func ConvertBaseStatusToNodeInfo(data model.BaseStatus, env string) vkModel.Node
8282
return vkModel.NodeInfo{
8383
Metadata: vkModel.NodeMetadata{
8484
Name: utils.FormatNodeName(data.BaseMetadata.Identity, env),
85+
BaseName: data.BaseMetadata.Name,
8586
ClusterName: data.BaseMetadata.ClusterName,
8687
Version: data.BaseMetadata.Version,
8788
},

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ require (
1010
github.com/go-resty/resty/v2 v2.11.0
1111
github.com/google/uuid v1.6.0
1212
github.com/koupleless/arkctl v0.2.3
13-
github.com/koupleless/virtual-kubelet v0.3.5
13+
github.com/koupleless/virtual-kubelet v0.3.6-0.20241219031131-baadab7cc6ab
1414
github.com/onsi/ginkgo/v2 v2.19.0
1515
github.com/onsi/gomega v1.33.1
1616
github.com/sirupsen/logrus v1.9.3

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI
9494
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
9595
github.com/koupleless/arkctl v0.2.3 h1:gjKvxvh2WT9dOGrFCWFFIAvnwN7uy1UtI7DA+npnJuY=
9696
github.com/koupleless/arkctl v0.2.3/go.mod h1:nbnAiPEv7x/ZDQ+QsjFWkqwxMDofGmqnFPHa3XpXHyE=
97-
github.com/koupleless/virtual-kubelet v0.3.5 h1:67BhE3zvJDys+6KOjMTBvs0T8AreUFD/Ekb1vssmIp0=
98-
github.com/koupleless/virtual-kubelet v0.3.5/go.mod h1:5fQ0uI9egbYDMxgUE0niS4agDTssIOCjq5wyO0ALNaU=
97+
github.com/koupleless/virtual-kubelet v0.3.6-0.20241219031131-baadab7cc6ab h1:DKR3MGxJh/NeKYdBwRhFplZ3WyufU1ZZpce4fVJs95Y=
98+
github.com/koupleless/virtual-kubelet v0.3.6-0.20241219031131-baadab7cc6ab/go.mod h1:5fQ0uI9egbYDMxgUE0niS4agDTssIOCjq5wyO0ALNaU=
9999
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
100100
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
101101
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=

0 commit comments

Comments
 (0)