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
55bc8d74
Commit
55bc8d74
authored
May 18, 2018
by
Yecheng Fu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle TERM signal to reduce pod terminating time.
parent
09c9ecd3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
deployment_util.go
test/e2e/framework/deployment_util.go
+1
-1
pv_util.go
test/e2e/framework/pv_util.go
+2
-2
util.go
test/e2e/framework/util.go
+1
-1
No files found.
test/e2e/framework/deployment_util.go
View file @
55bc8d74
...
...
@@ -231,7 +231,7 @@ func CreateDeployment(client clientset.Interface, replicas int32, podLabels map[
// name. A slice of BASH commands can be supplied as args to be run by the pod
func
MakeDeployment
(
replicas
int32
,
podLabels
map
[
string
]
string
,
nodeSelector
map
[
string
]
string
,
namespace
string
,
pvclaims
[]
*
v1
.
PersistentVolumeClaim
,
isPrivileged
bool
,
command
string
)
*
extensions
.
Deployment
{
if
len
(
command
)
==
0
{
command
=
"while true; do sleep 1; done"
command
=
"
trap exit TERM;
while true; do sleep 1; done"
}
zero
:=
int64
(
0
)
deploymentName
:=
"deployment-"
+
string
(
uuid
.
NewUUID
())
...
...
test/e2e/framework/pv_util.go
View file @
55bc8d74
...
...
@@ -815,7 +815,7 @@ func MakeWritePod(ns string, pvc *v1.PersistentVolumeClaim) *v1.Pod {
// name. A slice of BASH commands can be supplied as args to be run by the pod
func
MakePod
(
ns
string
,
nodeSelector
map
[
string
]
string
,
pvclaims
[]
*
v1
.
PersistentVolumeClaim
,
isPrivileged
bool
,
command
string
)
*
v1
.
Pod
{
if
len
(
command
)
==
0
{
command
=
"while true; do sleep 1; done"
command
=
"
trap exit TERM;
while true; do sleep 1; done"
}
podSpec
:=
&
v1
.
Pod
{
TypeMeta
:
metav1
.
TypeMeta
{
...
...
@@ -902,7 +902,7 @@ func MakeNginxPod(ns string, nodeSelector map[string]string, pvclaims []*v1.Pers
// SELinux testing requires to pass HostIPC and HostPID as booleansi arguments.
func
MakeSecPod
(
ns
string
,
pvclaims
[]
*
v1
.
PersistentVolumeClaim
,
isPrivileged
bool
,
command
string
,
hostIPC
bool
,
hostPID
bool
,
seLinuxLabel
*
v1
.
SELinuxOptions
,
fsGroup
*
int64
)
*
v1
.
Pod
{
if
len
(
command
)
==
0
{
command
=
"while true; do sleep 1; done"
command
=
"
trap exit TERM;
while true; do sleep 1; done"
}
podName
:=
"security-context-"
+
string
(
uuid
.
NewUUID
())
if
fsGroup
==
nil
{
...
...
test/e2e/framework/util.go
View file @
55bc8d74
...
...
@@ -3472,7 +3472,7 @@ func newExecPodSpec(ns, generateName string) *v1.Pod {
{
Name
:
"exec"
,
Image
:
BusyBoxImage
,
Command
:
[]
string
{
"sh"
,
"-c"
,
"while true; do sleep 5; done"
},
Command
:
[]
string
{
"sh"
,
"-c"
,
"
trap exit TERM;
while true; do sleep 5; done"
},
},
},
},
...
...
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