@@ -47,7 +47,7 @@ If '--keyring' is not specified, Helm usually defaults to the public keyring
47
47
unless your environment is otherwise configured.
48
48
`
49
49
50
- func newPackageCmd (cfg * action.Configuration , out io.Writer ) * cobra.Command {
50
+ func newPackageCmd (_ * action.Configuration , out io.Writer ) * cobra.Command {
51
51
client := action .NewPackage ()
52
52
valueOpts := & values.Options {}
53
53
@@ -75,6 +75,12 @@ func newPackageCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
75
75
return err
76
76
}
77
77
78
+ registryClient , err := newRegistryClient (client .CertFile , client .KeyFile , client .CAFile ,
79
+ client .InsecureSkipTLSverify , client .PlainHTTP , client .Username , client .Password )
80
+ if err != nil {
81
+ return fmt .Errorf ("missing registry client: %w" , err )
82
+ }
83
+
78
84
for i := 0 ; i < len (args ); i ++ {
79
85
path , err := filepath .Abs (args [i ])
80
86
if err != nil {
@@ -91,7 +97,7 @@ func newPackageCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
91
97
Keyring : client .Keyring ,
92
98
Getters : p ,
93
99
Debug : settings .Debug ,
94
- RegistryClient : cfg . RegistryClient ,
100
+ RegistryClient : registryClient ,
95
101
RepositoryConfig : settings .RepositoryConfig ,
96
102
RepositoryCache : settings .RepositoryCache ,
97
103
}
@@ -119,6 +125,13 @@ func newPackageCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
119
125
f .StringVar (& client .AppVersion , "app-version" , "" , "set the appVersion on the chart to this version" )
120
126
f .StringVarP (& client .Destination , "destination" , "d" , "." , "location to write the chart." )
121
127
f .BoolVarP (& client .DependencyUpdate , "dependency-update" , "u" , false , `update dependencies from "Chart.yaml" to dir "charts/" before packaging` )
128
+ f .StringVar (& client .Username , "username" , "" , "chart repository username where to locate the requested chart" )
129
+ f .StringVar (& client .Password , "password" , "" , "chart repository password where to locate the requested chart" )
130
+ f .StringVar (& client .CertFile , "cert-file" , "" , "identify HTTPS client using this SSL certificate file" )
131
+ f .StringVar (& client .KeyFile , "key-file" , "" , "identify HTTPS client using this SSL key file" )
132
+ f .BoolVar (& client .InsecureSkipTLSverify , "insecure-skip-tls-verify" , false , "skip tls certificate checks for the chart download" )
133
+ f .BoolVar (& client .PlainHTTP , "plain-http" , false , "use insecure HTTP connections for the chart download" )
134
+ f .StringVar (& client .CAFile , "ca-file" , "" , "verify certificates of HTTPS-enabled servers using this CA bundle" )
122
135
123
136
return cmd
124
137
}
0 commit comments