cmd updates based on pr feedback

Signed-off-by: Tom Runyon <tom@defenseunicorns.com>
pull/11623/head
Tom Runyon 3 years ago
parent c50cb0c0ae
commit 5dc446b52d
No known key found for this signature in database
GPG Key ID: D1CF51977E0E790F

@ -62,6 +62,7 @@ func addChartPathOptionsFlags(f *pflag.FlagSet, c *action.ChartPathOptions) {
f.BoolVar(&c.InsecureSkipTLSverify, "insecure-skip-tls-verify", false, "skip tls certificate checks for the chart download")
f.StringVar(&c.CaFile, "ca-file", "", "verify certificates of HTTPS-enabled servers using this CA bundle")
f.BoolVar(&c.PassCredentialsAll, "pass-credentials", false, "pass credentials to all domains")
f.BoolVar(&c.PlainHTTP, "plain-http", false, "install charts from http registry")
}
// bindOutputFlag will add the output flag to the given command and bind the

@ -43,7 +43,7 @@ result in an error, and the chart will not be saved locally.
`
func newPullCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
client := action.NewPullWithOpts(action.WithConfig(cfg), action.WithPullOptWriter(out))
client := action.NewPullWithOpts(action.WithConfig(cfg))
cmd := &cobra.Command{
Use: "pull [chart URL | repo/chartname] [...]",
@ -87,7 +87,6 @@ func newPullCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
f.BoolVar(&client.VerifyLater, "prov", false, "fetch the provenance file, but don't perform verification")
f.StringVar(&client.UntarDir, "untardir", ".", "if untar is specified, this flag specifies the name of the directory into which the chart is expanded")
f.StringVarP(&client.DestDir, "destination", "d", ".", "location to write the chart. If this and untardir are specified, untardir is appended to this")
f.BoolVar(&client.PlainHTTP, "plain-http", false, "install charts from http registry")
addChartPathOptionsFlags(f, &client.ChartPathOptions)
err := cmd.RegisterFlagCompletionFunc("version", func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {

@ -257,6 +257,7 @@ func checkForExpiredRepos(repofile string) {
}
// newRegistryClient creates a new registry client. plainHTTP takes precidence over any tls settings
func newRegistryClient(certFile, keyFile, caFile string, insecureSkipTLSverify bool, plainHTTP bool) (*registry.Client, error) {
if plainHTTP {

Loading…
Cancel
Save