Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Rancher Kubernetes Engine
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
rancher
Rancher Kubernetes Engine
Commits
d6b29c9c
Commit
d6b29c9c
authored
5 years ago
by
Sebastiaan van Steenis
Committed by
Alena Prokharchyk
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Do not fetch kube-admin certificate from host(s)
parent
0a170b22
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pki/deploy.go
+4
-2
4 additions, 2 deletions
pki/deploy.go
with
4 additions
and
2 deletions
pki/deploy.go
+
4
−
2
View file @
d6b29c9c
...
...
@@ -201,7 +201,8 @@ func FetchCertificatesFromHost(ctx context.Context, extraHosts []*hosts.Host, ho
// Return error if the certificate file is not found but only if its not etcd or request header certificate
if
err
!=
nil
&&
!
strings
.
HasPrefix
(
certName
,
"kube-etcd"
)
&&
certName
!=
RequestHeaderCACertName
&&
certName
!=
APIProxyClientCertName
{
certName
!=
APIProxyClientCertName
&&
certName
!=
KubeAdminCertName
{
// IsErrNotFound doesn't catch this because it's a custom error
if
isFileNotFoundErr
(
err
)
{
return
nil
,
fmt
.
Errorf
(
"Certificate %s is not found"
,
GetCertTempPath
(
certName
))
...
...
@@ -212,7 +213,8 @@ func FetchCertificatesFromHost(ctx context.Context, extraHosts []*hosts.Host, ho
// If I can't find an etcd or request header ca I will not fail and will create it later.
if
crt
==
""
&&
(
strings
.
HasPrefix
(
certName
,
"kube-etcd"
)
||
certName
==
RequestHeaderCACertName
||
certName
==
APIProxyClientCertName
)
{
certName
==
APIProxyClientCertName
||
certName
==
KubeAdminCertName
)
{
tmpCerts
[
certName
]
=
CertificatePKI
{}
continue
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment