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
aee1997a
Commit
aee1997a
authored
Apr 19, 2019
by
Jordan Liggitt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quiet integration test logs
parent
b3847120
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
12 deletions
+26
-12
storage_rbac.go
pkg/registry/rbac/rest/storage_rbac.go
+10
-10
server.go
test/integration/etcd/server.go
+7
-1
BUILD
test/integration/framework/BUILD
+2
-0
etcd.go
test/integration/framework/etcd.go
+7
-1
No files found.
pkg/registry/rbac/rest/storage_rbac.go
View file @
aee1997a
...
...
@@ -190,9 +190,9 @@ func (p *PolicyData) EnsureRBACPolicy() genericapiserver.PostStartHookFunc {
case
result
.
Protected
&&
result
.
Operation
!=
reconciliation
.
ReconcileNone
:
klog
.
Warningf
(
"skipped reconcile-protected clusterrole.%s/%s with missing permissions: %v"
,
rbac
.
GroupName
,
clusterRole
.
Name
,
result
.
MissingRules
)
case
result
.
Operation
==
reconciliation
.
ReconcileUpdate
:
klog
.
Infof
(
"updated clusterrole.%s/%s with additional permissions: %v"
,
rbac
.
GroupName
,
clusterRole
.
Name
,
result
.
MissingRules
)
klog
.
V
(
2
)
.
Infof
(
"updated clusterrole.%s/%s with additional permissions: %v"
,
rbac
.
GroupName
,
clusterRole
.
Name
,
result
.
MissingRules
)
case
result
.
Operation
==
reconciliation
.
ReconcileCreate
:
klog
.
Infof
(
"created clusterrole.%s/%s"
,
rbac
.
GroupName
,
clusterRole
.
Name
)
klog
.
V
(
2
)
.
Infof
(
"created clusterrole.%s/%s"
,
rbac
.
GroupName
,
clusterRole
.
Name
)
}
return
nil
})
...
...
@@ -218,11 +218,11 @@ func (p *PolicyData) EnsureRBACPolicy() genericapiserver.PostStartHookFunc {
case
result
.
Protected
&&
result
.
Operation
!=
reconciliation
.
ReconcileNone
:
klog
.
Warningf
(
"skipped reconcile-protected clusterrolebinding.%s/%s with missing subjects: %v"
,
rbac
.
GroupName
,
clusterRoleBinding
.
Name
,
result
.
MissingSubjects
)
case
result
.
Operation
==
reconciliation
.
ReconcileUpdate
:
klog
.
Infof
(
"updated clusterrolebinding.%s/%s with additional subjects: %v"
,
rbac
.
GroupName
,
clusterRoleBinding
.
Name
,
result
.
MissingSubjects
)
klog
.
V
(
2
)
.
Infof
(
"updated clusterrolebinding.%s/%s with additional subjects: %v"
,
rbac
.
GroupName
,
clusterRoleBinding
.
Name
,
result
.
MissingSubjects
)
case
result
.
Operation
==
reconciliation
.
ReconcileCreate
:
klog
.
Infof
(
"created clusterrolebinding.%s/%s"
,
rbac
.
GroupName
,
clusterRoleBinding
.
Name
)
klog
.
V
(
2
)
.
Infof
(
"created clusterrolebinding.%s/%s"
,
rbac
.
GroupName
,
clusterRoleBinding
.
Name
)
case
result
.
Operation
==
reconciliation
.
ReconcileRecreate
:
klog
.
Infof
(
"recreated clusterrolebinding.%s/%s"
,
rbac
.
GroupName
,
clusterRoleBinding
.
Name
)
klog
.
V
(
2
)
.
Infof
(
"recreated clusterrolebinding.%s/%s"
,
rbac
.
GroupName
,
clusterRoleBinding
.
Name
)
}
return
nil
})
...
...
@@ -249,9 +249,9 @@ func (p *PolicyData) EnsureRBACPolicy() genericapiserver.PostStartHookFunc {
case
result
.
Protected
&&
result
.
Operation
!=
reconciliation
.
ReconcileNone
:
klog
.
Warningf
(
"skipped reconcile-protected role.%s/%s in %v with missing permissions: %v"
,
rbac
.
GroupName
,
role
.
Name
,
namespace
,
result
.
MissingRules
)
case
result
.
Operation
==
reconciliation
.
ReconcileUpdate
:
klog
.
Infof
(
"updated role.%s/%s in %v with additional permissions: %v"
,
rbac
.
GroupName
,
role
.
Name
,
namespace
,
result
.
MissingRules
)
klog
.
V
(
2
)
.
Infof
(
"updated role.%s/%s in %v with additional permissions: %v"
,
rbac
.
GroupName
,
role
.
Name
,
namespace
,
result
.
MissingRules
)
case
result
.
Operation
==
reconciliation
.
ReconcileCreate
:
klog
.
Infof
(
"created role.%s/%s in %v"
,
rbac
.
GroupName
,
role
.
Name
,
namespace
)
klog
.
V
(
2
)
.
Infof
(
"created role.%s/%s in %v"
,
rbac
.
GroupName
,
role
.
Name
,
namespace
)
}
return
nil
})
...
...
@@ -279,11 +279,11 @@ func (p *PolicyData) EnsureRBACPolicy() genericapiserver.PostStartHookFunc {
case
result
.
Protected
&&
result
.
Operation
!=
reconciliation
.
ReconcileNone
:
klog
.
Warningf
(
"skipped reconcile-protected rolebinding.%s/%s in %v with missing subjects: %v"
,
rbac
.
GroupName
,
roleBinding
.
Name
,
namespace
,
result
.
MissingSubjects
)
case
result
.
Operation
==
reconciliation
.
ReconcileUpdate
:
klog
.
Infof
(
"updated rolebinding.%s/%s in %v with additional subjects: %v"
,
rbac
.
GroupName
,
roleBinding
.
Name
,
namespace
,
result
.
MissingSubjects
)
klog
.
V
(
2
)
.
Infof
(
"updated rolebinding.%s/%s in %v with additional subjects: %v"
,
rbac
.
GroupName
,
roleBinding
.
Name
,
namespace
,
result
.
MissingSubjects
)
case
result
.
Operation
==
reconciliation
.
ReconcileCreate
:
klog
.
Infof
(
"created rolebinding.%s/%s in %v"
,
rbac
.
GroupName
,
roleBinding
.
Name
,
namespace
)
klog
.
V
(
2
)
.
Infof
(
"created rolebinding.%s/%s in %v"
,
rbac
.
GroupName
,
roleBinding
.
Name
,
namespace
)
case
result
.
Operation
==
reconciliation
.
ReconcileRecreate
:
klog
.
Infof
(
"recreated rolebinding.%s/%s in %v"
,
rbac
.
GroupName
,
roleBinding
.
Name
,
namespace
)
klog
.
V
(
2
)
.
Infof
(
"recreated rolebinding.%s/%s in %v"
,
rbac
.
GroupName
,
roleBinding
.
Name
,
namespace
)
}
return
nil
})
...
...
test/integration/etcd/server.go
View file @
aee1997a
...
...
@@ -139,13 +139,19 @@ func StartRealMasterOrDie(t *testing.T, configFuncs ...func(*options.ServerRunOp
}()
lastHealth
:=
""
attempt
:=
0
if
err
:=
wait
.
PollImmediate
(
time
.
Second
,
time
.
Minute
,
func
()
(
done
bool
,
err
error
)
{
// wait for the server to be healthy
result
:=
kubeClient
.
RESTClient
()
.
Get
()
.
AbsPath
(
"/healthz"
)
.
Do
()
content
,
_
:=
result
.
Raw
()
lastHealth
=
string
(
content
)
if
errResult
:=
result
.
Error
();
errResult
!=
nil
{
t
.
Log
(
errResult
)
attempt
++
if
attempt
<
10
{
t
.
Log
(
"waiting for server to be healthy"
)
}
else
{
t
.
Log
(
errResult
)
}
return
false
,
nil
}
var
status
int
...
...
test/integration/framework/BUILD
View file @
aee1997a
...
...
@@ -78,8 +78,10 @@ go_library(
"//staging/src/k8s.io/client-go/util/cert:go_default_library",
"//test/e2e/framework:go_default_library",
"//test/utils:go_default_library",
"//vendor/github.com/coreos/etcd/clientv3:go_default_library",
"//vendor/github.com/go-openapi/spec:go_default_library",
"//vendor/github.com/pborman/uuid:go_default_library",
"//vendor/google.golang.org/grpc/grpclog:go_default_library",
"//vendor/k8s.io/klog:go_default_library",
"//vendor/k8s.io/kube-openapi/pkg/common:go_default_library",
],
...
...
test/integration/framework/etcd.go
View file @
aee1997a
...
...
@@ -27,6 +27,8 @@ import (
"runtime"
"strings"
"github.com/coreos/etcd/clientv3"
"google.golang.org/grpc/grpclog"
"k8s.io/klog"
"k8s.io/kubernetes/pkg/util/env"
...
...
@@ -109,7 +111,7 @@ func startEtcd() (func(), error) {
"--listen-peer-urls"
,
"http://127.0.0.1:0"
,
"--log-package-levels"
,
"*=
DEBUG"
,
"*=
NOTICE"
,
// set to INFO or DEBUG for more logs
)
cmd
.
Stdout
=
os
.
Stdout
cmd
.
Stderr
=
os
.
Stderr
...
...
@@ -123,6 +125,10 @@ func startEtcd() (func(), error) {
}
}
// Quiet etcd logs for integration tests
// Comment out to get verbose logs if desired
clientv3
.
SetLogger
(
grpclog
.
NewLoggerV2
(
ioutil
.
Discard
,
ioutil
.
Discard
,
os
.
Stderr
))
if
err
:=
cmd
.
Start
();
err
!=
nil
{
return
nil
,
fmt
.
Errorf
(
"failed to run etcd: %v"
,
err
)
}
...
...
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