...
1 package nodeagent
2
3 import (
4 "context"
5
6 "sigs.k8s.io/controller-runtime/pkg/client"
7
8 "edge-infra.dev/pkg/k8s/runtime/controller/reconcile"
9
10 v1ien "edge-infra.dev/pkg/sds/ien/k8s/apis/v1"
11 "edge-infra.dev/pkg/sds/ien/k8s/controllers/nodeagent/config"
12 "edge-infra.dev/pkg/sds/ien/k8s/controllers/nodeagent/plugins/clustersecrets/breakglass"
13 "edge-infra.dev/pkg/sds/ien/k8s/controllers/nodeagent/plugins/clustersecrets/grub"
14 "edge-infra.dev/pkg/sds/ien/k8s/controllers/nodeagent/plugins/edgeconfigsync"
15 "edge-infra.dev/pkg/sds/ien/k8s/controllers/nodeagent/plugins/example"
16 "edge-infra.dev/pkg/sds/ien/k8s/controllers/nodeagent/plugins/networking/cniplugin"
17 "edge-infra.dev/pkg/sds/ien/k8s/controllers/nodeagent/plugins/networking/dhclient"
18 "edge-infra.dev/pkg/sds/ien/k8s/controllers/nodeagent/plugins/networking/iptables"
19 "edge-infra.dev/pkg/sds/ien/k8s/controllers/nodeagent/plugins/networking/netplan"
20 "edge-infra.dev/pkg/sds/ien/k8s/controllers/nodeagent/plugins/networking/ntp"
21 "edge-infra.dev/pkg/sds/ien/k8s/controllers/nodeagent/plugins/networking/trafficshaping"
22 "edge-infra.dev/pkg/sds/ien/k8s/controllers/nodeagent/plugins/nodefirewall"
23 "edge-infra.dev/pkg/sds/ien/k8s/controllers/nodeagent/plugins/nodepatcher"
24 "edge-infra.dev/pkg/sds/ien/k8s/controllers/nodeagent/plugins/remoteagentconfig"
25 "edge-infra.dev/pkg/sds/ien/k8s/controllers/nodeagent/plugins/staticpodscheduler"
26 "edge-infra.dev/pkg/sds/ien/k8s/controllers/nodeagent/plugins/swapcfg"
27 "edge-infra.dev/pkg/sds/ien/k8s/controllers/nodeagent/plugins/thinclient"
28 )
29
30
31
32 type Plugin interface {
33 Reconcile(ctx context.Context, object client.Object, cfg config.Config) error
34 }
35
36
37 type IENPlugin interface {
38 Reconcile(ctx context.Context, ien *v1ien.IENode, cfg config.Config) (res reconcile.Result, recErr error)
39 }
40
41
42 var IENPlugins = map[string]IENPlugin{
43 "exampleIENode": example.IENodeExample{},
44 "netplan": netplan.Plugin{},
45 "nodepatcher": nodepatcher.NodePatcher{},
46 "ntp": ntp.Plugin{},
47 "cniplugin": cniplugin.CNIPlugin{},
48 "iptables": iptables.Plugin{},
49 "dhclient": dhclient.Plugin{},
50 "trafficshaping": trafficshaping.Plugin{},
51 "staticpodscheduler": staticpodscheduler.Plugin{},
52 "swapcfg": swapcfg.Plugin{},
53 "breakglass": breakglass.Plugin{},
54 "grub": grub.Plugin{},
55 "edgeconfigsync": edgeconfigsync.Plugin{
56 EdgeRegistriesFilepath: edgeconfigsync.DefaultEdgeRegistriesFilepath,
57 },
58 }
59
60 var GenericPlugins = map[string]Plugin{
61 "exampleNodeFirewall": example.NodeFirewallExample{},
62 "exampleSecret": example.SecretExample{},
63 "exampleConfigMap": example.ConfigMapExample{},
64 "thinclientsecretwatcher": thinclient.SecretWatcherPlugin{},
65 "remoteagentconfig": remoteagentconfig.Plugin{},
66 "thinclientconfig": thinclient.ConfigurationPlugin{},
67 "thinclientconfigmapwatcher": thinclient.ConfigMapWatcherPlugin{},
68 "nodefirewall": nodefirewall.Plugin{},
69 }
70
View as plain text