Skip to content

Commit

Permalink
fix: use correct TTL for talosconfig in talosctl config new
Browse files Browse the repository at this point in the history
See #8152

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
  • Loading branch information
smira committed Jan 22, 2024
1 parent fb5ad05 commit 4e9b688
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion cmd/talosctl/cmd/talos/config.go
Expand Up @@ -31,6 +31,7 @@ import (
machineapi "github.com/siderolabs/talos/pkg/machinery/api/machine"
"github.com/siderolabs/talos/pkg/machinery/client"
clientconfig "github.com/siderolabs/talos/pkg/machinery/client/config"
"github.com/siderolabs/talos/pkg/machinery/constants"
"github.com/siderolabs/talos/pkg/machinery/role"
)

Expand Down Expand Up @@ -617,7 +618,7 @@ func init() {
)

configNewCmd.Flags().StringSliceVar(&configNewCmdFlags.roles, "roles", role.MakeSet(role.Admin).Strings(), "roles")
configNewCmd.Flags().DurationVar(&configNewCmdFlags.crtTTL, "crt-ttl", 87600*time.Hour, "certificate TTL")
configNewCmd.Flags().DurationVar(&configNewCmdFlags.crtTTL, "crt-ttl", constants.TalosAPIDefaultCertificateValidityDuration, "certificate TTL")

configInfoCmd.Flags().StringVarP(&configInfoCmdFlags.output, "output", "o", "text", "output format (json|yaml|text). Default text.")

Expand Down
2 changes: 1 addition & 1 deletion website/content/v1.7/reference/cli.md
Expand Up @@ -538,7 +538,7 @@ talosctl config new [<path>] [flags]
### Options

```
--crt-ttl duration certificate TTL (default 87600h0m0s)
--crt-ttl duration certificate TTL (default 8760h0m0s)
-h, --help help for new
--roles strings roles (default [os:admin])
```
Expand Down

0 comments on commit 4e9b688

Please sign in to comment.