Skip to content

Commit

Permalink
fix(vault): fix vault init command
Browse files Browse the repository at this point in the history
resolves DATAINT-1504
  • Loading branch information
roehlerw committed Apr 5, 2023
1 parent 40a602e commit f6a2ccf
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
21 changes: 11 additions & 10 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,17 @@ builds:
- darwin
goarch:
- amd64
archive:
name_template: '{{ .ProjectName }}_{{ .Tag }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
replacements:
darwin: darwin
linux: linux
windows: windows
amd64: amd64
format_overrides:
- goos: windows
format: zip
archives:
- id: output
name_template: '{{ .ProjectName }}_{{ .Tag }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
replacements:
darwin: darwin
linux: linux
windows: windows
amd64: amd64
format_overrides:
- goos: windows
format: zip
checksum:
name_template: 'checksums.txt'
snapshot:
Expand Down
8 changes: 3 additions & 5 deletions cmd/vault.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,8 @@ Any values provided using --values will be in {{ .Values.xxx }}
})

const argVaultApplyDumpValues = "dump-values"
const argVaultForceGenerateRootToken = "generate-root"

func vaultInitFlags(cmd *cobra.Command) {
cmd.Flags().Bool(argVaultForceGenerateRootToken, false, "Generate a root token named 'root'.")
}
const argVaultForceGenerateRootToken = "generate-token-root"

var vaultInitCmd = &cobra.Command{
Use: "init [namespace]",
Expand Down Expand Up @@ -494,7 +491,8 @@ func init() {
vaultCmd.AddCommand(vaultJWTCmd)

addVaultFlags(vaultInitCmd)
vaultCmd.AddCommand(vaultInitCmd, initFlags)
vaultCmd.AddCommand(vaultInitCmd)
vaultInitCmd.Flags().Bool(argVaultForceGenerateRootToken, false, "Generate a root token with id 'root'")

addVaultFlags(vaultUnsealCmd)
vaultCmd.AddCommand(vaultUnsealCmd)
Expand Down

0 comments on commit f6a2ccf

Please sign in to comment.