package nodeagent import ( "context" "sigs.k8s.io/controller-runtime/pkg/client" "edge-infra.dev/pkg/k8s/runtime/controller/reconcile" v1ien "edge-infra.dev/pkg/sds/ien/k8s/apis/v1" "edge-infra.dev/pkg/sds/ien/k8s/controllers/nodeagent/config" "edge-infra.dev/pkg/sds/ien/k8s/controllers/nodeagent/plugins/clustersecrets/breakglass" "edge-infra.dev/pkg/sds/ien/k8s/controllers/nodeagent/plugins/clustersecrets/grub" "edge-infra.dev/pkg/sds/ien/k8s/controllers/nodeagent/plugins/edgeconfigsync" "edge-infra.dev/pkg/sds/ien/k8s/controllers/nodeagent/plugins/example" "edge-infra.dev/pkg/sds/ien/k8s/controllers/nodeagent/plugins/networking/cniplugin" "edge-infra.dev/pkg/sds/ien/k8s/controllers/nodeagent/plugins/networking/dhclient" "edge-infra.dev/pkg/sds/ien/k8s/controllers/nodeagent/plugins/networking/iptables" "edge-infra.dev/pkg/sds/ien/k8s/controllers/nodeagent/plugins/networking/netplan" "edge-infra.dev/pkg/sds/ien/k8s/controllers/nodeagent/plugins/networking/ntp" "edge-infra.dev/pkg/sds/ien/k8s/controllers/nodeagent/plugins/networking/trafficshaping" "edge-infra.dev/pkg/sds/ien/k8s/controllers/nodeagent/plugins/nodefirewall" "edge-infra.dev/pkg/sds/ien/k8s/controllers/nodeagent/plugins/nodepatcher" "edge-infra.dev/pkg/sds/ien/k8s/controllers/nodeagent/plugins/remoteagentconfig" "edge-infra.dev/pkg/sds/ien/k8s/controllers/nodeagent/plugins/staticpodscheduler" "edge-infra.dev/pkg/sds/ien/k8s/controllers/nodeagent/plugins/swapcfg" "edge-infra.dev/pkg/sds/ien/k8s/controllers/nodeagent/plugins/thinclient" ) // Plugin is interface for node agent plugins // TODO(bc185174): move to use reconcile results type Plugin interface { Reconcile(ctx context.Context, object client.Object, cfg config.Config) error } // Plugin is interface for IENode node agent plugins type IENPlugin interface { Reconcile(ctx context.Context, ien *v1ien.IENode, cfg config.Config) (res reconcile.Result, recErr error) } // IENPlugins is the pluginset to be attached to the IENode controller. var IENPlugins = map[string]IENPlugin{ "exampleIENode": example.IENodeExample{}, "netplan": netplan.Plugin{}, "nodepatcher": nodepatcher.NodePatcher{}, "ntp": ntp.Plugin{}, "cniplugin": cniplugin.CNIPlugin{}, "iptables": iptables.Plugin{}, "dhclient": dhclient.Plugin{}, "trafficshaping": trafficshaping.Plugin{}, "staticpodscheduler": staticpodscheduler.Plugin{}, "swapcfg": swapcfg.Plugin{}, "breakglass": breakglass.Plugin{}, "grub": grub.Plugin{}, "edgeconfigsync": edgeconfigsync.Plugin{ EdgeRegistriesFilepath: edgeconfigsync.DefaultEdgeRegistriesFilepath, }, } var GenericPlugins = map[string]Plugin{ "exampleNodeFirewall": example.NodeFirewallExample{}, "exampleSecret": example.SecretExample{}, "exampleConfigMap": example.ConfigMapExample{}, "thinclientsecretwatcher": thinclient.SecretWatcherPlugin{}, "remoteagentconfig": remoteagentconfig.Plugin{}, "thinclientconfig": thinclient.ConfigurationPlugin{}, "thinclientconfigmapwatcher": thinclient.ConfigMapWatcherPlugin{}, "nodefirewall": nodefirewall.Plugin{}, // TODO(bc185174): move to its own plugin interface }