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
10381305
Unverified
Commit
10381305
authored
Jan 07, 2019
by
Kubernetes Prow Robot
Committed by
GitHub
Jan 07, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #72518 from bart0sh/PR0055-selfhosting-pivot-controller-manager-config
kubeadm selfhosting: fix pod spec mutation for controller-manager
parents
3f2ef141
8148d95a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletion
+12
-1
podspec_mutation.go
cmd/kubeadm/app/phases/selfhosting/podspec_mutation.go
+8
-1
podspec_mutation_test.go
cmd/kubeadm/app/phases/selfhosting/podspec_mutation_test.go
+4
-0
No files found.
cmd/kubeadm/app/phases/selfhosting/podspec_mutation.go
View file @
10381305
...
...
@@ -159,7 +159,14 @@ func setSelfHostedVolumesForControllerManager(podSpec *v1.PodSpec) {
// This is not a problem with hostPath mounts as hostPath supports mounting one file only, instead of always a full directory. Secrets and Projected Volumes
// don't support that.
podSpec
.
Containers
[
0
]
.
Command
=
kubeadmutil
.
ReplaceArgument
(
podSpec
.
Containers
[
0
]
.
Command
,
func
(
argMap
map
[
string
]
string
)
map
[
string
]
string
{
argMap
[
"kubeconfig"
]
=
filepath
.
Join
(
selfHostedKubeConfigDir
,
kubeadmconstants
.
ControllerManagerKubeConfigFileName
)
controllerManagerKubeConfigPath
:=
filepath
.
Join
(
selfHostedKubeConfigDir
,
kubeadmconstants
.
ControllerManagerKubeConfigFileName
)
argMap
[
"kubeconfig"
]
=
controllerManagerKubeConfigPath
if
_
,
ok
:=
argMap
[
"authentication-kubeconfig"
];
ok
{
argMap
[
"authentication-kubeconfig"
]
=
controllerManagerKubeConfigPath
}
if
_
,
ok
:=
argMap
[
"authorization-kubeconfig"
];
ok
{
argMap
[
"authorization-kubeconfig"
]
=
controllerManagerKubeConfigPath
}
return
argMap
})
}
...
...
cmd/kubeadm/app/phases/selfhosting/podspec_mutation_test.go
View file @
10381305
...
...
@@ -414,6 +414,8 @@ func TestSetSelfHostedVolumesForControllerManager(t *testing.T) {
},
Command
:
[]
string
{
"--kubeconfig=/etc/kubernetes/controller-manager.conf"
,
"--authentication-kubeconfig=/etc/kubernetes/controller-manager.conf"
,
"--authorization-kubeconfig=/etc/kubernetes/controller-manager.conf"
,
"--foo=bar"
,
},
},
...
...
@@ -467,6 +469,8 @@ func TestSetSelfHostedVolumesForControllerManager(t *testing.T) {
},
Command
:
[]
string
{
"--kubeconfig=/etc/kubernetes/kubeconfig/controller-manager.conf"
,
"--authentication-kubeconfig=/etc/kubernetes/kubeconfig/controller-manager.conf"
,
"--authorization-kubeconfig=/etc/kubernetes/kubeconfig/controller-manager.conf"
,
"--foo=bar"
,
},
},
...
...
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