2021-12-02 21:19:16 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
"errors"
|
|
|
|
"os"
|
|
|
|
|
2022-03-02 23:47:27 +00:00
|
|
|
"github.com/k3s-io/k3s/pkg/cli/cert"
|
|
|
|
"github.com/k3s-io/k3s/pkg/cli/cmds"
|
|
|
|
"github.com/k3s-io/k3s/pkg/configfilearg"
|
2021-12-02 21:19:16 +00:00
|
|
|
"github.com/sirupsen/logrus"
|
|
|
|
"github.com/urfave/cli"
|
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
app := cmds.NewApp()
|
|
|
|
app.Commands = []cli.Command{
|
2023-10-09 17:58:49 +00:00
|
|
|
cmds.NewCertCommands(
|
2024-03-23 00:13:08 +00:00
|
|
|
cert.Check,
|
2023-10-09 17:58:49 +00:00
|
|
|
cert.Rotate,
|
|
|
|
cert.RotateCA,
|
2021-12-02 21:19:16 +00:00
|
|
|
),
|
|
|
|
}
|
|
|
|
|
|
|
|
if err := app.Run(configfilearg.MustParse(os.Args)); err != nil && !errors.Is(err, context.Canceled) {
|
|
|
|
logrus.Fatal(err)
|
|
|
|
}
|
|
|
|
}
|