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{
|
2022-12-05 23:28:01 +00:00
|
|
|
cmds.NewSecretsEncryptCommands(
|
|
|
|
secretsencrypt.Status,
|
|
|
|
secretsencrypt.Enable,
|
|
|
|
secretsencrypt.Disable,
|
|
|
|
secretsencrypt.Prepare,
|
|
|
|
secretsencrypt.Rotate,
|
|
|
|
secretsencrypt.Reencrypt,
|
2023-08-01 17:20:21 +00:00
|
|
|
secretsencrypt.RotateKeys,
|
2021-12-07 22:31:32 +00:00
|
|
|
),
|
|
|
|
}
|
|
|
|
|
|
|
|
if err := app.Run(configfilearg.MustParse(os.Args)); err != nil && !errors.Is(err, context.Canceled) {
|
|
|
|
logrus.Fatal(err)
|
|
|
|
}
|
|
|
|
}
|