Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warn that v1.28 will deprecate reencrypt/prepare #7848

Merged
merged 2 commits into from
Jul 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions pkg/cli/secretsencrypt/secrets_encrypt.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions pkg/server/secrets-encrypt.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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
}
Expand Down