Skip to content

Commit 0687961

Browse files
committedAug 2, 2024··
Revert CAFile rename breaking change
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
1 parent 12d8d28 commit 0687961

File tree

8 files changed

+11
-11
lines changed

8 files changed

+11
-11
lines changed
 

‎cmd/helm/flags.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ func addChartPathOptionsFlags(f *pflag.FlagSet, c *action.ChartPathOptions) {
6262
f.StringVar(&c.KeyFile, "key-file", "", "identify HTTPS client using this SSL key file")
6363
f.BoolVar(&c.InsecureSkipTLSverify, "insecure-skip-tls-verify", false, "skip tls certificate checks for the chart download")
6464
f.BoolVar(&c.PlainHTTP, "plain-http", false, "use insecure HTTP connections for the chart download")
65-
f.StringVar(&c.CAFile, "ca-file", "", "verify certificates of HTTPS-enabled servers using this CA bundle")
65+
f.StringVar(&c.CaFile, "ca-file", "", "verify certificates of HTTPS-enabled servers using this CA bundle")
6666
f.BoolVar(&c.PassCredentialsAll, "pass-credentials", false, "pass credentials to all domains")
6767
}
6868

‎cmd/helm/install.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ func newInstallCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
140140
return compInstall(args, toComplete, client)
141141
},
142142
RunE: func(_ *cobra.Command, args []string) error {
143-
registryClient, err := newRegistryClient(client.CertFile, client.KeyFile, client.CAFile,
143+
registryClient, err := newRegistryClient(client.CertFile, client.KeyFile, client.CaFile,
144144
client.InsecureSkipTLSverify, client.PlainHTTP, client.Username, client.Password)
145145
if err != nil {
146146
return fmt.Errorf("missing registry client: %w", err)

‎cmd/helm/pull.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ func newPullCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
6464
client.Version = ">0.0.0-0"
6565
}
6666

67-
registryClient, err := newRegistryClient(client.CertFile, client.KeyFile, client.CAFile,
67+
registryClient, err := newRegistryClient(client.CertFile, client.KeyFile, client.CaFile,
6868
client.InsecureSkipTLSverify, client.PlainHTTP, client.Username, client.Password)
6969
if err != nil {
7070
return fmt.Errorf("missing registry client: %w", err)

‎cmd/helm/show.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ func runShow(args []string, client *action.Show) (string, error) {
226226
}
227227

228228
func addRegistryClient(client *action.Show) error {
229-
registryClient, err := newRegistryClient(client.CertFile, client.KeyFile, client.CAFile,
229+
registryClient, err := newRegistryClient(client.CertFile, client.KeyFile, client.CaFile,
230230
client.InsecureSkipTLSverify, client.PlainHTTP, client.Username, client.Password)
231231
if err != nil {
232232
return fmt.Errorf("missing registry client: %w", err)

‎cmd/helm/template.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ func newTemplateCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
7373
client.KubeVersion = parsedKubeVersion
7474
}
7575

76-
registryClient, err := newRegistryClient(client.CertFile, client.KeyFile, client.CAFile,
76+
registryClient, err := newRegistryClient(client.CertFile, client.KeyFile, client.CaFile,
7777
client.InsecureSkipTLSverify, client.PlainHTTP, client.Username, client.Password)
7878
if err != nil {
7979
return fmt.Errorf("missing registry client: %w", err)

‎cmd/helm/upgrade.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ func newUpgradeCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
102102
RunE: func(_ *cobra.Command, args []string) error {
103103
client.Namespace = settings.Namespace()
104104

105-
registryClient, err := newRegistryClient(client.CertFile, client.KeyFile, client.CAFile,
105+
registryClient, err := newRegistryClient(client.CertFile, client.KeyFile, client.CaFile,
106106
client.InsecureSkipTLSverify, client.PlainHTTP, client.Username, client.Password)
107107
if err != nil {
108108
return fmt.Errorf("missing registry client: %w", err)

‎pkg/action/install.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ type Install struct {
115115

116116
// ChartPathOptions captures common options used for controlling chart paths
117117
type ChartPathOptions struct {
118-
CAFile string // --ca-file
118+
CaFile string // --ca-file
119119
CertFile string // --cert-file
120120
KeyFile string // --key-file
121121
InsecureSkipTLSverify bool // --insecure-skip-verify
@@ -759,7 +759,7 @@ func (c *ChartPathOptions) LocateChart(name string, settings *cli.EnvSettings) (
759759
Getters: getter.All(settings),
760760
Options: []getter.Option{
761761
getter.WithPassCredentialsAll(c.PassCredentialsAll),
762-
getter.WithTLSClientConfig(c.CertFile, c.KeyFile, c.CAFile),
762+
getter.WithTLSClientConfig(c.CertFile, c.KeyFile, c.CaFile),
763763
getter.WithInsecureSkipVerifyTLS(c.InsecureSkipTLSverify),
764764
getter.WithPlainHTTP(c.PlainHTTP),
765765
getter.WithBasicAuth(c.Username, c.Password),
@@ -778,7 +778,7 @@ func (c *ChartPathOptions) LocateChart(name string, settings *cli.EnvSettings) (
778778
}
779779
if c.RepoURL != "" {
780780
chartURL, err := repo.FindChartInAuthAndTLSAndPassRepoURL(c.RepoURL, c.Username, c.Password, name, version,
781-
c.CertFile, c.KeyFile, c.CAFile, c.InsecureSkipTLSverify, c.PassCredentialsAll, getter.All(settings))
781+
c.CertFile, c.KeyFile, c.CaFile, c.InsecureSkipTLSverify, c.PassCredentialsAll, getter.All(settings))
782782
if err != nil {
783783
return "", err
784784
}

‎pkg/action/pull.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ func (p *Pull) Run(chartRef string) (string, error) {
8888
Options: []getter.Option{
8989
getter.WithBasicAuth(p.Username, p.Password),
9090
getter.WithPassCredentialsAll(p.PassCredentialsAll),
91-
getter.WithTLSClientConfig(p.CertFile, p.KeyFile, p.CAFile),
91+
getter.WithTLSClientConfig(p.CertFile, p.KeyFile, p.CaFile),
9292
getter.WithInsecureSkipVerifyTLS(p.InsecureSkipTLSverify),
9393
getter.WithPlainHTTP(p.PlainHTTP),
9494
},
@@ -122,7 +122,7 @@ func (p *Pull) Run(chartRef string) (string, error) {
122122
}
123123

124124
if p.RepoURL != "" {
125-
chartURL, err := repo.FindChartInAuthAndTLSAndPassRepoURL(p.RepoURL, p.Username, p.Password, chartRef, p.Version, p.CertFile, p.KeyFile, p.CAFile, p.InsecureSkipTLSverify, p.PassCredentialsAll, getter.All(p.Settings))
125+
chartURL, err := repo.FindChartInAuthAndTLSAndPassRepoURL(p.RepoURL, p.Username, p.Password, chartRef, p.Version, p.CertFile, p.KeyFile, p.CaFile, p.InsecureSkipTLSverify, p.PassCredentialsAll, getter.All(p.Settings))
126126
if err != nil {
127127
return out.String(), err
128128
}

0 commit comments

Comments
 (0)
Please sign in to comment.