mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
Warn that v1.28 will deprecate reencrypt/prepare (#7848)
* Warn that v1.28 will deprecate reencrypt/prepare Signed-off-by: Derek Nola <derek.nola@suse.com>
This commit is contained in:
parent
6c44b06e0a
commit
4ab01f3941
@ -16,6 +16,7 @@ import (
|
||||
"github.com/k3s-io/k3s/pkg/server"
|
||||
"github.com/k3s-io/k3s/pkg/version"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/urfave/cli"
|
||||
"k8s.io/utils/pointer"
|
||||
)
|
||||
@ -151,6 +152,7 @@ func Prepare(app *cli.Context) error {
|
||||
if err = cmds.InitLogging(); err != nil {
|
||||
return err
|
||||
}
|
||||
logrus.Warnln("This command will be deprecated in v1.28, will be combined with rotate")
|
||||
info, err := commandPrep(app, &cmds.ServerConfig)
|
||||
if err != nil {
|
||||
return err
|
||||
@ -196,6 +198,7 @@ func Reencrypt(app *cli.Context) error {
|
||||
if err = cmds.InitLogging(); err != nil {
|
||||
return err
|
||||
}
|
||||
logrus.Warnln("This command will be deprecated in v1.28, will be combined with rotate")
|
||||
info, err := commandPrep(app, &cmds.ServerConfig)
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -208,6 +208,7 @@ func encryptionPrepare(ctx context.Context, server *config.Control, force bool)
|
||||
if err := AppendNewEncryptionKey(&curKeys); err != nil {
|
||||
return err
|
||||
}
|
||||
logrus.Warnln("prepare command will be deprecated in v1.28, will be combined with rotate")
|
||||
logrus.Infoln("Adding secrets-encryption key: ", curKeys[len(curKeys)-1])
|
||||
|
||||
if err := secretsencrypt.WriteEncryptionConfig(server.Runtime, curKeys, true); err != nil {
|
||||
@ -275,6 +276,7 @@ func encryptionReencrypt(ctx context.Context, server *config.Control, force bool
|
||||
if _, err = server.Runtime.Core.Core().V1().Node().Update(node); err != nil {
|
||||
return err
|
||||
}
|
||||
logrus.Warnln("reencrypt command will be deprecated in v1.28, will be combined with rotate")
|
||||
logrus.Debugf("encryption hash annotation set successfully on node: %s\n", node.ObjectMeta.Name)
|
||||
return nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user