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
220b07f2
Commit
220b07f2
authored
Apr 20, 2019
by
aaa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace variables 10250 and 10255 with constants
update pull request
parent
40f691a4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
BUILD
cmd/kubemark/BUILD
+1
-0
hollow-node.go
cmd/kubemark/hollow-node.go
+3
-2
No files found.
cmd/kubemark/BUILD
View file @
220b07f2
...
...
@@ -23,6 +23,7 @@ go_library(
"//pkg/kubelet/dockershim:go_default_library",
"//pkg/kubelet/dockershim/libdocker:go_default_library",
"//pkg/kubemark:go_default_library",
"//pkg/master/ports:go_default_library",
"//pkg/util/iptables/testing:go_default_library",
"//pkg/util/sysctl/testing:go_default_library",
"//pkg/version/prometheus:go_default_library",
...
...
cmd/kubemark/hollow-node.go
View file @
220b07f2
...
...
@@ -42,6 +42,7 @@ import (
"k8s.io/kubernetes/pkg/kubelet/dockershim"
"k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker"
"k8s.io/kubernetes/pkg/kubemark"
"k8s.io/kubernetes/pkg/master/ports"
fakeiptables
"k8s.io/kubernetes/pkg/util/iptables/testing"
fakesysctl
"k8s.io/kubernetes/pkg/util/sysctl/testing"
_
"k8s.io/kubernetes/pkg/version/prometheus"
// for version metric registration
...
...
@@ -73,8 +74,8 @@ var knownMorphs = sets.NewString("kubelet", "proxy")
func
(
c
*
hollowNodeConfig
)
addFlags
(
fs
*
pflag
.
FlagSet
)
{
fs
.
StringVar
(
&
c
.
KubeconfigPath
,
"kubeconfig"
,
"/kubeconfig/kubeconfig"
,
"Path to kubeconfig file."
)
fs
.
IntVar
(
&
c
.
KubeletPort
,
"kubelet-port"
,
10250
,
"Port on which HollowKubelet should be listening."
)
fs
.
IntVar
(
&
c
.
KubeletReadOnlyPort
,
"kubelet-read-only-port"
,
10255
,
"Read-only port on which Kubelet is listening."
)
fs
.
IntVar
(
&
c
.
KubeletPort
,
"kubelet-port"
,
ports
.
KubeletPort
,
"Port on which HollowKubelet should be listening."
)
fs
.
IntVar
(
&
c
.
KubeletReadOnlyPort
,
"kubelet-read-only-port"
,
ports
.
KubeletReadOnlyPort
,
"Read-only port on which Kubelet is listening."
)
fs
.
StringVar
(
&
c
.
NodeName
,
"name"
,
"fake-node"
,
"Name of this Hollow Node."
)
fs
.
IntVar
(
&
c
.
ServerPort
,
"api-server-port"
,
443
,
"Port on which API server is listening."
)
fs
.
StringVar
(
&
c
.
Morph
,
"morph"
,
""
,
fmt
.
Sprintf
(
"Specifies into which Hollow component this binary should morph. Allowed values: %v"
,
knownMorphs
.
List
()))
...
...
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