Skip to content

Commit f90f7df

Browse files
fprojettoadamjensenbot
authored andcommitted
cleanup virtual kubelet old reflection
Remove code related to virtual kubelet reflection because superseeded by new work queue based reflection.
1 parent 826ba32 commit f90f7df

37 files changed

+10
-2438
lines changed

cmd/virtual-kubelet/root/flag.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ func InstallFlags(flags *pflag.FlagSet, c *Opts) {
3737

3838
flags.DurationVar(&c.InformerResyncPeriod, "full-resync-period", c.InformerResyncPeriod,
3939
"how often to perform a full resync of pods between kubernetes and the provider")
40-
flags.DurationVar(&c.LiqoInformerResyncPeriod, "liqo-resync-period", c.LiqoInformerResyncPeriod,
41-
"how often to perform a full resync of Liqo resources informers")
4240
flags.DurationVar(&c.StartupTimeout, "startup-timeout", c.StartupTimeout, "How long to wait for the virtual-kubelet to start")
4341

4442
flags.StringVar(&c.ForeignClusterID, "foreign-cluster-id", c.ForeignClusterID, "The Id of the foreign cluster")

cmd/virtual-kubelet/root/opts.go

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,10 @@ import (
2828

2929
// Defaults for root command options.
3030
const (
31-
DefaultNodeName = "virtual-kubelet"
32-
DefaultInformerResyncPeriod = 1 * time.Minute
33-
DefaultLiqoInformerResyncPeriod time.Duration = 0
34-
DefaultMetricsAddr = ":10255"
35-
DefaultListenPort = 10250
31+
DefaultNodeName = "virtual-kubelet"
32+
DefaultInformerResyncPeriod = 10 * time.Hour
33+
DefaultMetricsAddr = ":10255"
34+
DefaultListenPort = 10250
3635

3736
DefaultPodWorkers = 10
3837
DefaultServiceWorkers = 3
@@ -69,8 +68,7 @@ type Opts struct {
6968
SecretWorkers uint
7069
PersistenVolumeClaimWorkers uint
7170

72-
InformerResyncPeriod time.Duration
73-
LiqoInformerResyncPeriod time.Duration
71+
InformerResyncPeriod time.Duration
7472

7573
// Startup Timeout is how long to wait for the kubelet to start
7674
StartupTimeout time.Duration
@@ -98,10 +96,6 @@ func SetDefaultOpts(c *Opts) error {
9896
c.InformerResyncPeriod = DefaultInformerResyncPeriod
9997
}
10098

101-
if c.LiqoInformerResyncPeriod == 0 {
102-
c.InformerResyncPeriod = DefaultLiqoInformerResyncPeriod
103-
}
104-
10599
if c.MetricsAddr == "" {
106100
c.MetricsAddr = DefaultMetricsAddr
107101
}

cmd/virtual-kubelet/root/root.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,6 @@ func runRootCommand(ctx context.Context, c *Opts) error {
109109
return err
110110
}
111111

112-
podProviderStopper := make(chan struct{})
113-
podProvider.SetProviderStopper(podProviderStopper)
114-
115112
// Initialize the node provider
116113
nodecfg := nodeprovider.InitConfig{
117114
HomeConfig: config,
@@ -126,8 +123,7 @@ func runRootCommand(ctx context.Context, c *Opts) error {
126123
ExtraLabels: c.NodeExtraLabels.StringMap,
127124
ExtraAnnotations: c.NodeExtraAnnotations.StringMap,
128125

129-
PodProviderStopper: podProviderStopper,
130-
InformerResyncPeriod: c.LiqoInformerResyncPeriod,
126+
InformerResyncPeriod: c.InformerResyncPeriod,
131127
}
132128

133129
nodeProvider := nodeprovider.NewLiqoNodeProvider(&nodecfg)

pkg/virtualKubelet/apiReflection/const.go

Lines changed: 0 additions & 36 deletions
This file was deleted.

pkg/virtualKubelet/apiReflection/controller/controller.go

Lines changed: 0 additions & 195 deletions
This file was deleted.

pkg/virtualKubelet/apiReflection/controller/incomingReflectorsController.go

Lines changed: 0 additions & 97 deletions
This file was deleted.

0 commit comments

Comments
 (0)