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
40a4c1f7
Unverified
Commit
40a4c1f7
authored
Feb 08, 2019
by
Kubernetes Prow Robot
Committed by
GitHub
Feb 08, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #73854 from RajatVaryani/master
Fix linting in cmd/kubemark package
parents
ee44e24c
17fd6694
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
6 deletions
+5
-6
hollow-node.go
cmd/kubemark/hollow-node.go
+5
-5
.golint_failures
hack/.golint_failures
+0
-1
No files found.
cmd/kubemark/hollow-node.go
View file @
40a4c1f7
...
...
@@ -49,7 +49,7 @@ import (
fakeexec
"k8s.io/utils/exec/testing"
)
type
H
ollowNodeConfig
struct
{
type
h
ollowNodeConfig
struct
{
KubeconfigPath
string
KubeletPort
int
KubeletReadOnlyPort
int
...
...
@@ -71,7 +71,7 @@ const (
// and make the config driven.
var
knownMorphs
=
sets
.
NewString
(
"kubelet"
,
"proxy"
)
func
(
c
*
H
ollowNodeConfig
)
addFlags
(
fs
*
pflag
.
FlagSet
)
{
func
(
c
*
h
ollowNodeConfig
)
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."
)
...
...
@@ -84,7 +84,7 @@ func (c *HollowNodeConfig) addFlags(fs *pflag.FlagSet) {
fs
.
DurationVar
(
&
c
.
ProxierMinSyncPeriod
,
"proxier-min-sync-period"
,
0
,
"Minimum period that proxy rules are refreshed in hollow-proxy."
)
}
func
(
c
*
H
ollowNodeConfig
)
createClientConfigFromFile
()
(
*
restclient
.
Config
,
error
)
{
func
(
c
*
h
ollowNodeConfig
)
createClientConfigFromFile
()
(
*
restclient
.
Config
,
error
)
{
clientConfig
,
err
:=
clientcmd
.
LoadFromFile
(
c
.
KubeconfigPath
)
if
err
!=
nil
{
return
nil
,
fmt
.
Errorf
(
"error while loading kubeconfig from file %v: %v"
,
c
.
KubeconfigPath
,
err
)
...
...
@@ -121,7 +121,7 @@ func main() {
// newControllerManagerCommand creates a *cobra.Command object with default parameters
func
newHollowNodeCommand
()
*
cobra
.
Command
{
s
:=
&
H
ollowNodeConfig
{}
s
:=
&
h
ollowNodeConfig
{}
cmd
:=
&
cobra
.
Command
{
Use
:
"kubemark"
,
...
...
@@ -136,7 +136,7 @@ func newHollowNodeCommand() *cobra.Command {
return
cmd
}
func
run
(
config
*
H
ollowNodeConfig
)
{
func
run
(
config
*
h
ollowNodeConfig
)
{
if
!
knownMorphs
.
Has
(
config
.
Morph
)
{
klog
.
Fatalf
(
"Unknown morph: %v. Allowed values: %v"
,
config
.
Morph
,
knownMorphs
.
List
())
}
...
...
hack/.golint_failures
View file @
40a4c1f7
...
...
@@ -9,7 +9,6 @@ cmd/kubeadm/app/util/config
cmd/kubeadm/app/util/system
cmd/kubelet/app
cmd/kubelet/app/options
cmd/kubemark
pkg/apis/abac/latest
pkg/apis/admission
pkg/apis/admission/v1beta1
...
...
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