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
dcd00c93
Commit
dcd00c93
authored
Jan 13, 2015
by
Joe Beda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move all kubernetes to posix flags
parent
b9dd9c4f
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
45 additions
and
15 deletions
+45
-15
e2e.go
cmd/e2e/e2e.go
+3
-1
integration.go
cmd/integration/integration.go
+2
-1
apiserver.go
cmd/kube-apiserver/apiserver.go
+2
-1
controller-manager.go
cmd/kube-controller-manager/controller-manager.go
+3
-1
proxy.go
cmd/kube-proxy/proxy.go
+3
-1
kubecfg.go
cmd/kubecfg/kubecfg.go
+1
-0
kubelet.go
cmd/kubelet/kubelet.go
+3
-1
kubernetes.go
cmd/kubernetes/kubernetes.go
+2
-1
quantity.go
pkg/api/resource/quantity.go
+1
-1
serialization_test.go
pkg/api/serialization_test.go
+1
-1
scheme_test.go
pkg/conversion/scheme_test.go
+1
-1
logs.go
pkg/util/logs.go
+1
-1
net_test.go
pkg/util/net_test.go
+2
-1
plog_import.go
pkg/util/plog_import.go
+12
-1
verflag.go
pkg/version/verflag/verflag.go
+5
-1
scheduler.go
plugin/cmd/kube-scheduler/scheduler.go
+3
-1
No files found.
cmd/e2e/e2e.go
View file @
dcd00c93
...
@@ -17,7 +17,6 @@ limitations under the License.
...
@@ -17,7 +17,6 @@ limitations under the License.
package
main
package
main
import
(
import
(
"flag"
"fmt"
"fmt"
"io/ioutil"
"io/ioutil"
"os"
"os"
...
@@ -35,6 +34,8 @@ import (
...
@@ -35,6 +34,8 @@ import (
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime"
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime"
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
"github.com/golang/glog"
"github.com/golang/glog"
flag
"github.com/spf13/pflag"
)
)
var
(
var
(
...
@@ -699,6 +700,7 @@ func TestPodHasServiceEnvVars(c *client.Client) bool {
...
@@ -699,6 +700,7 @@ func TestPodHasServiceEnvVars(c *client.Client) bool {
}
}
func
main
()
{
func
main
()
{
util
.
AddAllFlagsToPFlags
()
flag
.
Parse
()
flag
.
Parse
()
goruntime
.
GOMAXPROCS
(
goruntime
.
NumCPU
())
goruntime
.
GOMAXPROCS
(
goruntime
.
NumCPU
())
util
.
ReallyCrash
=
true
util
.
ReallyCrash
=
true
...
...
cmd/integration/integration.go
View file @
dcd00c93
...
@@ -19,7 +19,6 @@ limitations under the License.
...
@@ -19,7 +19,6 @@ limitations under the License.
package
main
package
main
import
(
import
(
"flag"
"io/ioutil"
"io/ioutil"
"net"
"net"
"net/http"
"net/http"
...
@@ -54,6 +53,7 @@ import (
...
@@ -54,6 +53,7 @@ import (
"github.com/coreos/go-etcd/etcd"
"github.com/coreos/go-etcd/etcd"
"github.com/golang/glog"
"github.com/golang/glog"
flag
"github.com/spf13/pflag"
)
)
var
(
var
(
...
@@ -563,6 +563,7 @@ func runServiceTest(client *client.Client) {
...
@@ -563,6 +563,7 @@ func runServiceTest(client *client.Client) {
type
testFunc
func
(
*
client
.
Client
)
type
testFunc
func
(
*
client
.
Client
)
func
main
()
{
func
main
()
{
util
.
AddAllFlagsToPFlags
()
flag
.
Parse
()
flag
.
Parse
()
runtime
.
GOMAXPROCS
(
runtime
.
NumCPU
())
runtime
.
GOMAXPROCS
(
runtime
.
NumCPU
())
util
.
ReallyCrash
=
true
util
.
ReallyCrash
=
true
...
...
cmd/kube-apiserver/apiserver.go
View file @
dcd00c93
...
@@ -20,7 +20,6 @@ package main
...
@@ -20,7 +20,6 @@ package main
import
(
import
(
"crypto/tls"
"crypto/tls"
"flag"
"net"
"net"
"net/http"
"net/http"
"strconv"
"strconv"
...
@@ -40,6 +39,7 @@ import (
...
@@ -40,6 +39,7 @@ import (
"github.com/coreos/go-etcd/etcd"
"github.com/coreos/go-etcd/etcd"
"github.com/golang/glog"
"github.com/golang/glog"
flag
"github.com/spf13/pflag"
)
)
var
(
var
(
...
@@ -124,6 +124,7 @@ func newEtcd(etcdConfigFile string, etcdServerList util.StringList) (helper tool
...
@@ -124,6 +124,7 @@ func newEtcd(etcdConfigFile string, etcdServerList util.StringList) (helper tool
}
}
func
main
()
{
func
main
()
{
util
.
AddAllFlagsToPFlags
()
flag
.
Parse
()
flag
.
Parse
()
util
.
InitLogs
()
util
.
InitLogs
()
defer
util
.
FlushLogs
()
defer
util
.
FlushLogs
()
...
...
cmd/kube-controller-manager/controller-manager.go
View file @
dcd00c93
...
@@ -21,7 +21,6 @@ limitations under the License.
...
@@ -21,7 +21,6 @@ limitations under the License.
package
main
package
main
import
(
import
(
"flag"
"net"
"net"
"net/http"
"net/http"
"strconv"
"strconv"
...
@@ -38,7 +37,9 @@ import (
...
@@ -38,7 +37,9 @@ import (
"github.com/GoogleCloudPlatform/kubernetes/pkg/service"
"github.com/GoogleCloudPlatform/kubernetes/pkg/service"
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
"github.com/GoogleCloudPlatform/kubernetes/pkg/version/verflag"
"github.com/GoogleCloudPlatform/kubernetes/pkg/version/verflag"
"github.com/golang/glog"
"github.com/golang/glog"
flag
"github.com/spf13/pflag"
)
)
var
(
var
(
...
@@ -74,6 +75,7 @@ func verifyMinionFlags() {
...
@@ -74,6 +75,7 @@ func verifyMinionFlags() {
}
}
func
main
()
{
func
main
()
{
util
.
AddAllFlagsToPFlags
()
flag
.
Parse
()
flag
.
Parse
()
util
.
InitLogs
()
util
.
InitLogs
()
defer
util
.
FlushLogs
()
defer
util
.
FlushLogs
()
...
...
cmd/kube-proxy/proxy.go
View file @
dcd00c93
...
@@ -17,7 +17,6 @@ limitations under the License.
...
@@ -17,7 +17,6 @@ limitations under the License.
package
main
package
main
import
(
import
(
"flag"
"net"
"net"
"net/http"
"net/http"
"strconv"
"strconv"
...
@@ -32,8 +31,10 @@ import (
...
@@ -32,8 +31,10 @@ import (
"github.com/GoogleCloudPlatform/kubernetes/pkg/util/exec"
"github.com/GoogleCloudPlatform/kubernetes/pkg/util/exec"
"github.com/GoogleCloudPlatform/kubernetes/pkg/util/iptables"
"github.com/GoogleCloudPlatform/kubernetes/pkg/util/iptables"
"github.com/GoogleCloudPlatform/kubernetes/pkg/version/verflag"
"github.com/GoogleCloudPlatform/kubernetes/pkg/version/verflag"
"github.com/coreos/go-etcd/etcd"
"github.com/coreos/go-etcd/etcd"
"github.com/golang/glog"
"github.com/golang/glog"
flag
"github.com/spf13/pflag"
)
)
var
(
var
(
...
@@ -52,6 +53,7 @@ func init() {
...
@@ -52,6 +53,7 @@ func init() {
}
}
func
main
()
{
func
main
()
{
util
.
AddAllFlagsToPFlags
()
flag
.
Parse
()
flag
.
Parse
()
util
.
InitLogs
()
util
.
InitLogs
()
defer
util
.
FlushLogs
()
defer
util
.
FlushLogs
()
...
...
cmd/kubecfg/kubecfg.go
View file @
dcd00c93
...
@@ -37,6 +37,7 @@ import (
...
@@ -37,6 +37,7 @@ import (
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
"github.com/GoogleCloudPlatform/kubernetes/pkg/version"
"github.com/GoogleCloudPlatform/kubernetes/pkg/version"
"github.com/GoogleCloudPlatform/kubernetes/pkg/version/verflag"
"github.com/GoogleCloudPlatform/kubernetes/pkg/version/verflag"
"github.com/golang/glog"
"github.com/golang/glog"
"github.com/skratchdot/open-golang/open"
"github.com/skratchdot/open-golang/open"
)
)
...
...
cmd/kubelet/kubelet.go
View file @
dcd00c93
...
@@ -21,7 +21,6 @@ limitations under the License.
...
@@ -21,7 +21,6 @@ limitations under the License.
package
main
package
main
import
(
import
(
"flag"
"math/rand"
"math/rand"
"net"
"net"
"time"
"time"
...
@@ -33,7 +32,9 @@ import (
...
@@ -33,7 +32,9 @@ import (
"github.com/GoogleCloudPlatform/kubernetes/pkg/standalone"
"github.com/GoogleCloudPlatform/kubernetes/pkg/standalone"
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
"github.com/GoogleCloudPlatform/kubernetes/pkg/version/verflag"
"github.com/GoogleCloudPlatform/kubernetes/pkg/version/verflag"
"github.com/golang/glog"
"github.com/golang/glog"
flag
"github.com/spf13/pflag"
)
)
const
defaultRootDir
=
"/var/lib/kubelet"
const
defaultRootDir
=
"/var/lib/kubelet"
...
@@ -89,6 +90,7 @@ func setupRunOnce() {
...
@@ -89,6 +90,7 @@ func setupRunOnce() {
}
}
func
main
()
{
func
main
()
{
util
.
AddAllFlagsToPFlags
()
flag
.
Parse
()
flag
.
Parse
()
util
.
InitLogs
()
util
.
InitLogs
()
defer
util
.
FlushLogs
()
defer
util
.
FlushLogs
()
...
...
cmd/kubernetes/kubernetes.go
View file @
dcd00c93
...
@@ -21,7 +21,6 @@ limitations under the License.
...
@@ -21,7 +21,6 @@ limitations under the License.
package
main
package
main
import
(
import
(
"flag"
"fmt"
"fmt"
"time"
"time"
...
@@ -33,6 +32,7 @@ import (
...
@@ -33,6 +32,7 @@ import (
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
"github.com/golang/glog"
"github.com/golang/glog"
flag
"github.com/spf13/pflag"
)
)
var
(
var
(
...
@@ -66,6 +66,7 @@ func newApiClient(addr string, port int) *client.Client {
...
@@ -66,6 +66,7 @@ func newApiClient(addr string, port int) *client.Client {
}
}
func
main
()
{
func
main
()
{
util
.
AddAllFlagsToPFlags
()
flag
.
Parse
()
flag
.
Parse
()
util
.
InitLogs
()
util
.
InitLogs
()
defer
util
.
FlushLogs
()
defer
util
.
FlushLogs
()
...
...
pkg/api/resource/quantity.go
View file @
dcd00c93
...
@@ -18,12 +18,12 @@ package resource
...
@@ -18,12 +18,12 @@ package resource
import
(
import
(
"errors"
"errors"
"flag"
"fmt"
"fmt"
"math/big"
"math/big"
"regexp"
"regexp"
"strings"
"strings"
flag
"github.com/spf13/pflag"
"speter.net/go/exp/math/dec/inf"
"speter.net/go/exp/math/dec/inf"
)
)
...
...
pkg/api/serialization_test.go
View file @
dcd00c93
...
@@ -19,7 +19,6 @@ package api_test
...
@@ -19,7 +19,6 @@ package api_test
import
(
import
(
"encoding/json"
"encoding/json"
"flag"
"math/rand"
"math/rand"
"reflect"
"reflect"
"strconv"
"strconv"
...
@@ -37,6 +36,7 @@ import (
...
@@ -37,6 +36,7 @@ import (
docker
"github.com/fsouza/go-dockerclient"
docker
"github.com/fsouza/go-dockerclient"
fuzz
"github.com/google/gofuzz"
fuzz
"github.com/google/gofuzz"
flag
"github.com/spf13/pflag"
"speter.net/go/exp/math/dec/inf"
"speter.net/go/exp/math/dec/inf"
)
)
...
...
pkg/conversion/scheme_test.go
View file @
dcd00c93
...
@@ -18,7 +18,6 @@ package conversion
...
@@ -18,7 +18,6 @@ package conversion
import
(
import
(
"encoding/json"
"encoding/json"
"flag"
"fmt"
"fmt"
"reflect"
"reflect"
"strings"
"strings"
...
@@ -28,6 +27,7 @@ import (
...
@@ -28,6 +27,7 @@ import (
"github.com/ghodss/yaml"
"github.com/ghodss/yaml"
"github.com/google/gofuzz"
"github.com/google/gofuzz"
flag
"github.com/spf13/pflag"
)
)
var
fuzzIters
=
flag
.
Int
(
"fuzz_iters"
,
50
,
"How many fuzzing iterations to do."
)
var
fuzzIters
=
flag
.
Int
(
"fuzz_iters"
,
50
,
"How many fuzzing iterations to do."
)
...
...
pkg/util/logs.go
View file @
dcd00c93
...
@@ -17,11 +17,11 @@ limitations under the License.
...
@@ -17,11 +17,11 @@ limitations under the License.
package
util
package
util
import
(
import
(
"flag"
"log"
"log"
"time"
"time"
"github.com/golang/glog"
"github.com/golang/glog"
flag
"github.com/spf13/pflag"
)
)
var
logFlushFreq
=
flag
.
Duration
(
"log_flush_frequency"
,
5
*
time
.
Second
,
"Maximum number of seconds between log flushes"
)
var
logFlushFreq
=
flag
.
Duration
(
"log_flush_frequency"
,
5
*
time
.
Second
,
"Maximum number of seconds between log flushes"
)
...
...
pkg/util/net_test.go
View file @
dcd00c93
...
@@ -17,8 +17,9 @@ limitations under the License.
...
@@ -17,8 +17,9 @@ limitations under the License.
package
util
package
util
import
(
import
(
"flag"
"testing"
"testing"
flag
"github.com/spf13/pflag"
)
)
func
TestIP
(
t
*
testing
.
T
)
{
func
TestIP
(
t
*
testing
.
T
)
{
...
...
pkg/util/plog_import.go
View file @
dcd00c93
...
@@ -42,7 +42,13 @@ func wrapFlagValue(v flag.Value) pflag.Value {
...
@@ -42,7 +42,13 @@ func wrapFlagValue(v flag.Value) pflag.Value {
pv
:=
&
flagValueWrapper
{
pv
:=
&
flagValueWrapper
{
inner
:
v
,
inner
:
v
,
}
}
pv
.
flagType
=
reflect
.
TypeOf
(
v
)
.
Elem
()
.
Name
()
t
:=
reflect
.
TypeOf
(
v
)
if
t
.
Kind
()
==
reflect
.
Interface
||
t
.
Kind
()
==
reflect
.
Ptr
{
t
=
t
.
Elem
()
}
pv
.
flagType
=
t
.
Name
()
pv
.
flagType
=
strings
.
TrimSuffix
(
pv
.
flagType
,
"Value"
)
pv
.
flagType
=
strings
.
TrimSuffix
(
pv
.
flagType
,
"Value"
)
return
pv
return
pv
}
}
...
@@ -76,3 +82,8 @@ func AddFlagSetToPFlagSet(fsIn *flag.FlagSet, fsOut *pflag.FlagSet) {
...
@@ -76,3 +82,8 @@ func AddFlagSetToPFlagSet(fsIn *flag.FlagSet, fsOut *pflag.FlagSet) {
func
AddAllFlagsToPFlagSet
(
fs
*
pflag
.
FlagSet
)
{
func
AddAllFlagsToPFlagSet
(
fs
*
pflag
.
FlagSet
)
{
AddFlagSetToPFlagSet
(
flag
.
CommandLine
,
fs
)
AddFlagSetToPFlagSet
(
flag
.
CommandLine
,
fs
)
}
}
// Add al of the top level 'flag' package flags to the top level 'pflag' flags.
func
AddAllFlagsToPFlags
()
{
AddFlagSetToPFlagSet
(
flag
.
CommandLine
,
pflag
.
CommandLine
)
}
pkg/version/verflag/verflag.go
View file @
dcd00c93
...
@@ -19,12 +19,12 @@ limitations under the License.
...
@@ -19,12 +19,12 @@ limitations under the License.
package
verflag
package
verflag
import
(
import
(
"flag"
"fmt"
"fmt"
"os"
"os"
"strconv"
"strconv"
"github.com/GoogleCloudPlatform/kubernetes/pkg/version"
"github.com/GoogleCloudPlatform/kubernetes/pkg/version"
flag
"github.com/spf13/pflag"
)
)
type
versionValue
int
type
versionValue
int
...
@@ -66,6 +66,10 @@ func (v *versionValue) String() string {
...
@@ -66,6 +66,10 @@ func (v *versionValue) String() string {
return
fmt
.
Sprintf
(
"%v"
,
bool
(
*
v
==
VersionTrue
))
return
fmt
.
Sprintf
(
"%v"
,
bool
(
*
v
==
VersionTrue
))
}
}
func
(
v
*
versionValue
)
Type
()
string
{
return
"version"
}
func
VersionVar
(
p
*
versionValue
,
name
string
,
value
versionValue
,
usage
string
)
{
func
VersionVar
(
p
*
versionValue
,
name
string
,
value
versionValue
,
usage
string
)
{
*
p
=
value
*
p
=
value
flag
.
Var
(
p
,
name
,
usage
)
flag
.
Var
(
p
,
name
,
usage
)
...
...
plugin/cmd/kube-scheduler/scheduler.go
View file @
dcd00c93
...
@@ -17,7 +17,6 @@ limitations under the License.
...
@@ -17,7 +17,6 @@ limitations under the License.
package
main
package
main
import
(
import
(
"flag"
"net"
"net"
"net/http"
"net/http"
"strconv"
"strconv"
...
@@ -33,6 +32,8 @@ import (
...
@@ -33,6 +32,8 @@ import (
_
"github.com/GoogleCloudPlatform/kubernetes/plugin/pkg/scheduler/algorithmprovider"
_
"github.com/GoogleCloudPlatform/kubernetes/plugin/pkg/scheduler/algorithmprovider"
"github.com/GoogleCloudPlatform/kubernetes/plugin/pkg/scheduler/factory"
"github.com/GoogleCloudPlatform/kubernetes/plugin/pkg/scheduler/factory"
"github.com/golang/glog"
"github.com/golang/glog"
flag
"github.com/spf13/pflag"
)
)
var
(
var
(
...
@@ -47,6 +48,7 @@ func init() {
...
@@ -47,6 +48,7 @@ func init() {
}
}
func
main
()
{
func
main
()
{
util
.
AddAllFlagsToPFlags
()
flag
.
Parse
()
flag
.
Parse
()
util
.
InitLogs
()
util
.
InitLogs
()
defer
util
.
FlushLogs
()
defer
util
.
FlushLogs
()
...
...
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