|
|
@ -41,15 +41,8 @@ var createSecretHelmCmd = &cobra.Command{
|
|
|
|
--export > repo-auth.yaml
|
|
|
|
--export > repo-auth.yaml
|
|
|
|
|
|
|
|
|
|
|
|
sops --encrypt --encrypted-regex '^(data|stringData)$' \
|
|
|
|
sops --encrypt --encrypted-regex '^(data|stringData)$' \
|
|
|
|
--in-place repo-auth.yaml
|
|
|
|
--in-place repo-auth.yaml`,
|
|
|
|
|
|
|
|
|
|
|
|
# Create a Helm authentication secret using a custom TLS cert
|
|
|
|
|
|
|
|
flux create secret helm repo-auth \
|
|
|
|
|
|
|
|
--username=username \
|
|
|
|
|
|
|
|
--password=password \
|
|
|
|
|
|
|
|
--cert-file=./cert.crt \
|
|
|
|
|
|
|
|
--key-file=./key.crt \
|
|
|
|
|
|
|
|
--ca-file=./ca.crt`,
|
|
|
|
|
|
|
|
RunE: createSecretHelmCmdRun,
|
|
|
|
RunE: createSecretHelmCmdRun,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -62,9 +55,16 @@ type secretHelmFlags struct {
|
|
|
|
var secretHelmArgs secretHelmFlags
|
|
|
|
var secretHelmArgs secretHelmFlags
|
|
|
|
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
func init() {
|
|
|
|
createSecretHelmCmd.Flags().StringVarP(&secretHelmArgs.username, "username", "u", "", "basic authentication username")
|
|
|
|
flags := createSecretHelmCmd.Flags()
|
|
|
|
createSecretHelmCmd.Flags().StringVarP(&secretHelmArgs.password, "password", "p", "", "basic authentication password")
|
|
|
|
flags.StringVarP(&secretHelmArgs.username, "username", "u", "", "basic authentication username")
|
|
|
|
initSecretTLSFlags(createSecretHelmCmd.Flags(), &secretHelmArgs.secretTLSFlags)
|
|
|
|
flags.StringVarP(&secretHelmArgs.password, "password", "p", "", "basic authentication password")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
initSecretDeprecatedTLSFlags(flags, &secretHelmArgs.secretTLSFlags)
|
|
|
|
|
|
|
|
deprecationMsg := "please use the command `flux create secret tls` to generate TLS secrets"
|
|
|
|
|
|
|
|
flags.MarkDeprecated("cert-file", deprecationMsg)
|
|
|
|
|
|
|
|
flags.MarkDeprecated("key-file", deprecationMsg)
|
|
|
|
|
|
|
|
flags.MarkDeprecated("ca-file", deprecationMsg)
|
|
|
|
|
|
|
|
|
|
|
|
createSecretCmd.AddCommand(createSecretHelmCmd)
|
|
|
|
createSecretCmd.AddCommand(createSecretHelmCmd)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|