1
0
mirror of https://github.com/kairos-io/kairos-agent.git synced 2025-05-12 18:34:27 +00:00

Merge pull request from c3os-io/feature/cluster-provider

Abstract Cluster Provisioning with Cluster Plugins
This commit is contained in:
Ettore Di Giacinto 2022-08-09 08:01:54 +02:00 committed by Itxaka
parent fe08c577ed
commit 43907c8d95
2 changed files with 22 additions and 1 deletions
cmd
agent
provider

View File

@ -91,6 +91,26 @@ See https://docs.c3os.io/after_install/upgrades/#manual for documentation.
},
},
{
Name: "notify",
Usage: "notify <event> <config dir>...",
UsageText: "emits the given event with a generic event payload",
Description: `
Sends a generic event payload with the configuration found in the scanned directories.
`,
Aliases: []string{},
Flags: []cli.Flag{},
Action: func(c *cli.Context) error {
dirs := []string{"/oem", "/usr/local/cloud-config"}
args := c.Args()
if len(args) > 1 {
dirs = args[1:]
}
return agent.Notify(args[0], dirs)
},
},
{
Name: "start",
Usage: "Starts the c3os agent",

View File

@ -4,8 +4,9 @@ import (
"fmt"
"os"
"github.com/c3os-io/c3os/sdk/bus"
"github.com/c3os-io/c3os/internal/provider"
"github.com/c3os-io/c3os/pkg/bus"
"github.com/mudler/go-pluggable"
)