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
a2a807b5
Unverified
Commit
a2a807b5
authored
Sep 11, 2016
by
Evgeny L
Committed by
Ilya Dmitrichenko
Sep 24, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mount etcd data directory to host
parent
ac849dab
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
1 deletion
+19
-1
kubeadm.go
cmd/kubeadm/app/kubeadm.go
+1
-0
manifests.go
pkg/kubeadm/master/manifests.go
+18
-1
No files found.
cmd/kubeadm/app/kubeadm.go
View file @
a2a807b5
...
@@ -42,6 +42,7 @@ func getEnvParams() map[string]string {
...
@@ -42,6 +42,7 @@ func getEnvParams() map[string]string {
envParams
:=
map
[
string
]
string
{
envParams
:=
map
[
string
]
string
{
"prefix"
:
globalPrefix
,
"prefix"
:
globalPrefix
,
"host_pki_path"
:
path
.
Join
(
globalPrefix
,
"pki"
),
"host_pki_path"
:
path
.
Join
(
globalPrefix
,
"pki"
),
"host_etcd_path"
:
"/var/lib/etcd"
,
"hyperkube_image"
:
""
,
"hyperkube_image"
:
""
,
"discovery_image"
:
"dgoodwin/kubediscovery:latest"
,
// TODO(phase1): fmt.Sprintf("gcr.io/google_containers/kube-discovery-%s:%s", runtime.GOARCH, "1.0"),
"discovery_image"
:
"dgoodwin/kubediscovery:latest"
,
// TODO(phase1): fmt.Sprintf("gcr.io/google_containers/kube-discovery-%s:%s", runtime.GOARCH, "1.0"),
"etcd_image"
:
""
,
"etcd_image"
:
""
,
...
...
pkg/kubeadm/master/manifests.go
View file @
a2a807b5
...
@@ -63,11 +63,12 @@ func WriteStaticPodManifests(s *kubeadmapi.KubeadmConfig) error {
...
@@ -63,11 +63,12 @@ func WriteStaticPodManifests(s *kubeadmapi.KubeadmConfig) error {
"--advertise-client-urls=http://127.0.0.1:2379"
,
"--advertise-client-urls=http://127.0.0.1:2379"
,
"--data-dir=/var/etcd/data"
,
"--data-dir=/var/etcd/data"
,
},
},
VolumeMounts
:
[]
api
.
VolumeMount
{
etcdVolumeMount
()},
Image
:
images
.
GetCoreImage
(
images
.
KubeEtcdImage
,
s
.
EnvParams
[
"etcd_image"
]),
Image
:
images
.
GetCoreImage
(
images
.
KubeEtcdImage
,
s
.
EnvParams
[
"etcd_image"
]),
LivenessProbe
:
componentProbe
(
2379
,
"/health"
),
LivenessProbe
:
componentProbe
(
2379
,
"/health"
),
Name
:
etcd
,
Name
:
etcd
,
Resources
:
componentResources
(
"200m"
),
Resources
:
componentResources
(
"200m"
),
}),
}
,
etcdVolume
(
s
)
),
// TODO bind-mount certs in
// TODO bind-mount certs in
kubeAPIServer
:
componentPod
(
api
.
Container
{
kubeAPIServer
:
componentPod
(
api
.
Container
{
Name
:
kubeAPIServer
,
Name
:
kubeAPIServer
,
...
@@ -111,6 +112,22 @@ func WriteStaticPodManifests(s *kubeadmapi.KubeadmConfig) error {
...
@@ -111,6 +112,22 @@ func WriteStaticPodManifests(s *kubeadmapi.KubeadmConfig) error {
return
nil
return
nil
}
}
func
etcdVolume
(
s
*
kubeadmapi
.
KubeadmConfig
)
api
.
Volume
{
return
api
.
Volume
{
Name
:
"etcd"
,
VolumeSource
:
api
.
VolumeSource
{
HostPath
:
&
api
.
HostPathVolumeSource
{
Path
:
s
.
EnvParams
[
"host_etcd_path"
]},
},
}
}
func
etcdVolumeMount
()
api
.
VolumeMount
{
return
api
.
VolumeMount
{
Name
:
"etcd"
,
MountPath
:
"/var/etcd"
,
}
}
func
pkiVolume
(
s
*
kubeadmapi
.
KubeadmConfig
)
api
.
Volume
{
func
pkiVolume
(
s
*
kubeadmapi
.
KubeadmConfig
)
api
.
Volume
{
return
api
.
Volume
{
return
api
.
Volume
{
Name
:
"pki"
,
Name
:
"pki"
,
...
...
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