Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
helm3
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
helm3
Commits
16571305
Unverified
Commit
16571305
authored
Dec 01, 2017
by
Matthew Fisher
Committed by
GitHub
Dec 01, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3224 from bacongobbler/tls-default-path
fix TLS default path
parents
96976043
618094cc
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
4 deletions
+25
-4
helm.go
cmd/helm/helm.go
+3
-3
helmhome.go
pkg/helm/helmpath/helmhome.go
+16
-1
helmhome_unix_test.go
pkg/helm/helmpath/helmhome_unix_test.go
+3
-0
helmhome_windows_test.go
pkg/helm/helmpath/helmhome_windows_test.go
+3
-0
No files found.
cmd/helm/helm.go
View file @
16571305
...
...
@@ -268,13 +268,13 @@ func newClient() helm.Interface {
if
tlsVerify
||
tlsEnable
{
if
tlsCaCertFile
==
""
{
tlsCaCertFile
=
os
.
ExpandEnv
(
tlsCaCertDefault
)
tlsCaCertFile
=
settings
.
Home
.
TLSCaCert
(
)
}
if
tlsCertFile
==
""
{
tlsCertFile
=
os
.
ExpandEnv
(
tlsCertDefault
)
tlsCertFile
=
settings
.
Home
.
TLSCert
(
)
}
if
tlsKeyFile
==
""
{
tlsKeyFile
=
os
.
ExpandEnv
(
tlsKeyDefault
)
tlsKeyFile
=
settings
.
Home
.
TLSKey
(
)
}
debug
(
"Key=%q, Cert=%q, CA=%q
\n
"
,
tlsKeyFile
,
tlsCertFile
,
tlsCaCertFile
)
tlsopts
:=
tlsutil
.
Options
{
KeyFile
:
tlsKeyFile
,
CertFile
:
tlsCertFile
,
InsecureSkipVerify
:
true
}
...
...
pkg/helm/helmpath/helmhome.go
View file @
16571305
...
...
@@ -82,7 +82,22 @@ func (h Home) Plugins() string {
return
h
.
Path
(
"plugins"
)
}
// Archive returns the path to download chart archives
// Archive returns the path to download chart archives
.
func
(
h
Home
)
Archive
()
string
{
return
h
.
Path
(
"cache"
,
"archive"
)
}
// TLSCaCert returns the path to fetch the CA certificate.
func
(
h
Home
)
TLSCaCert
()
string
{
return
h
.
Path
(
"ca.pem"
)
}
// TLSCert returns the path to fetch the client certificate.
func
(
h
Home
)
TLSCert
()
string
{
return
h
.
Path
(
"cert.pem"
)
}
// TLSKey returns the path to fetch the client public key.
func
(
h
Home
)
TLSKey
()
string
{
return
h
.
Path
(
"key.pem"
)
}
pkg/helm/helmpath/helmhome_unix_test.go
View file @
16571305
...
...
@@ -38,6 +38,9 @@ func TestHelmHome(t *testing.T) {
isEq
(
t
,
hh
.
CacheIndex
(
"t"
),
"/r/repository/cache/t-index.yaml"
)
isEq
(
t
,
hh
.
Starters
(),
"/r/starters"
)
isEq
(
t
,
hh
.
Archive
(),
"/r/cache/archive"
)
isEq
(
t
,
hh
.
TLSCaCert
(),
"/r/ca.pem"
)
isEq
(
t
,
hh
.
TLSCert
(),
"/r/cert.pem"
)
isEq
(
t
,
hh
.
TLSKey
(),
"/r/key.pem"
)
}
func
TestHelmHome_expand
(
t
*
testing
.
T
)
{
...
...
pkg/helm/helmpath/helmhome_windows_test.go
View file @
16571305
...
...
@@ -35,4 +35,7 @@ func TestHelmHome(t *testing.T) {
isEq
(
t
,
hh
.
CacheIndex
(
"t"
),
"r:
\\
repository
\\
cache
\\
t-index.yaml"
)
isEq
(
t
,
hh
.
Starters
(),
"r:
\\
starters"
)
isEq
(
t
,
hh
.
Archive
(),
"r:
\\
cache
\\
archive"
)
isEq
(
t
,
hh
.
TLSCaCert
(),
"r:
\\
ca.pem"
)
isEq
(
t
,
hh
.
TLSCert
(),
"r:
\\
cert.pem"
)
isEq
(
t
,
hh
.
TLSKey
(),
"r:
\\
key.pem"
)
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment