Skip to content

Commit b8a675c

Browse files
carabasdanielactions-user
authored andcommitted
fix: fix panic if running from main.go with only kubeconfig parameter (#1379)
GitOrigin-RevId: 61fde678f5b780cacf4f6f3711c5f4bd30881582
1 parent a462de5 commit b8a675c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

k8s-source/cmd/root.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,9 @@ func run(_ *cobra.Command, _ []string) int {
142142
if clusterName == "" {
143143
clusterName = k8sURL.Host
144144
}
145-
145+
if engineConfig.HeartbeatOptions == nil {
146+
engineConfig.HeartbeatOptions = &discovery.HeartbeatOptions{}
147+
}
146148
engineConfig.HeartbeatOptions.HealthCheck = func(ctx context.Context) error {
147149
ctx, cancel := context.WithTimeout(ctx, 10*time.Second)
148150
defer cancel()

0 commit comments

Comments
 (0)