Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
da59a6da
Unverified
Commit
da59a6da
authored
Jan 02, 2019
by
Kubernetes Prow Robot
Committed by
GitHub
Jan 02, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #72478 from bart0sh/PR0054-kubeadm-selfhosting-pivot-kube-apiserver
kubeadm: add required etcd certs to selfhosting api-server
parents
58eb3e4b
7b058c43
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
1 deletion
+46
-1
selfhosting_volumes.go
cmd/kubeadm/app/phases/selfhosting/selfhosting_volumes.go
+46
-1
No files found.
cmd/kubeadm/app/phases/selfhosting/selfhosting_volumes.go
View file @
da59a6da
...
@@ -20,6 +20,7 @@ import (
...
@@ -20,6 +20,7 @@ import (
"fmt"
"fmt"
"io/ioutil"
"io/ioutil"
"path/filepath"
"path/filepath"
"strings"
"k8s.io/api/core/v1"
"k8s.io/api/core/v1"
metav1
"k8s.io/apimachinery/pkg/apis/meta/v1"
metav1
"k8s.io/apimachinery/pkg/apis/meta/v1"
...
@@ -128,6 +129,40 @@ func apiServerCertificatesVolumeSource() v1.VolumeSource {
...
@@ -128,6 +129,40 @@ func apiServerCertificatesVolumeSource() v1.VolumeSource {
},
},
},
},
},
},
{
Secret
:
&
v1
.
SecretProjection
{
LocalObjectReference
:
v1
.
LocalObjectReference
{
Name
:
strings
.
Replace
(
kubeadmconstants
.
EtcdCACertAndKeyBaseName
,
"/"
,
"-"
,
-
1
),
},
Items
:
[]
v1
.
KeyToPath
{
{
Key
:
v1
.
TLSCertKey
,
Path
:
kubeadmconstants
.
EtcdCACertName
,
},
{
Key
:
v1
.
TLSPrivateKeyKey
,
Path
:
kubeadmconstants
.
EtcdCAKeyName
,
},
},
},
},
{
Secret
:
&
v1
.
SecretProjection
{
LocalObjectReference
:
v1
.
LocalObjectReference
{
Name
:
kubeadmconstants
.
APIServerEtcdClientCertAndKeyBaseName
,
},
Items
:
[]
v1
.
KeyToPath
{
{
Key
:
v1
.
TLSCertKey
,
Path
:
kubeadmconstants
.
APIServerEtcdClientCertName
,
},
{
Key
:
v1
.
TLSPrivateKeyKey
,
Path
:
kubeadmconstants
.
APIServerEtcdClientKeyName
,
},
},
},
},
},
},
},
},
}
}
...
@@ -175,7 +210,7 @@ func controllerManagerCertificatesVolumeSource() v1.VolumeSource {
...
@@ -175,7 +210,7 @@ func controllerManagerCertificatesVolumeSource() v1.VolumeSource {
func
kubeConfigVolumeSource
(
kubeconfigSecretName
string
)
v1
.
VolumeSource
{
func
kubeConfigVolumeSource
(
kubeconfigSecretName
string
)
v1
.
VolumeSource
{
return
v1
.
VolumeSource
{
return
v1
.
VolumeSource
{
Secret
:
&
v1
.
SecretVolumeSource
{
Secret
:
&
v1
.
SecretVolumeSource
{
SecretName
:
kubeconfigSecretName
,
SecretName
:
strings
.
Replace
(
kubeconfigSecretName
,
"/"
,
"-"
,
-
1
)
,
},
},
}
}
}
}
...
@@ -294,5 +329,15 @@ func getTLSKeyPairs() []*tlsKeyPair {
...
@@ -294,5 +329,15 @@ func getTLSKeyPairs() []*tlsKeyPair {
cert
:
kubeadmconstants
.
FrontProxyClientCertName
,
cert
:
kubeadmconstants
.
FrontProxyClientCertName
,
key
:
kubeadmconstants
.
FrontProxyClientKeyName
,
key
:
kubeadmconstants
.
FrontProxyClientKeyName
,
},
},
{
name
:
strings
.
Replace
(
kubeadmconstants
.
EtcdCACertAndKeyBaseName
,
"/"
,
"-"
,
-
1
),
cert
:
kubeadmconstants
.
EtcdCACertName
,
key
:
kubeadmconstants
.
EtcdCAKeyName
,
},
{
name
:
kubeadmconstants
.
APIServerEtcdClientCertAndKeyBaseName
,
cert
:
kubeadmconstants
.
APIServerEtcdClientCertName
,
key
:
kubeadmconstants
.
APIServerEtcdClientKeyName
,
},
}
}
}
}
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