2021-12-07 22:31:32 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
"errors"
|
|
|
|
"os"
|
|
|
|
|
2022-03-02 23:47:27 +00:00
|
|
|
"github.com/k3s-io/k3s/pkg/cli/cmds"
|
|
|
|
"github.com/k3s-io/k3s/pkg/cli/secretsencrypt"
|
|
|
|
"github.com/k3s-io/k3s/pkg/configfilearg"
|
2021-12-07 22:31:32 +00:00
|
|
|
"github.com/sirupsen/logrus"
|
|
|
|
"github.com/urfave/cli"
|
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
app := cmds.NewApp()
|
|
|
|
app.Commands = []cli.Command{
|
|
|
|
cmds.NewSecretsEncryptCommand(cli.ShowAppHelp,
|
|
|
|
cmds.NewSecretsEncryptSubcommands(
|
|
|
|
secretsencrypt.Status,
|
|
|
|
secretsencrypt.Enable,
|
|
|
|
secretsencrypt.Disable,
|
|
|
|
secretsencrypt.Prepare,
|
|
|
|
secretsencrypt.Rotate,
|
|
|
|
secretsencrypt.Reencrypt),
|
|
|
|
),
|
|
|
|
}
|
|
|
|
|
|
|
|
if err := app.Run(configfilearg.MustParse(os.Args)); err != nil && !errors.Is(err, context.Canceled) {
|
|
|
|
logrus.Fatal(err)
|
|
|
|
}
|
|
|
|
}
|