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
932ece5c
Commit
932ece5c
authored
Apr 04, 2017
by
zhangxiaoyu-zidif
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
e3d534b2
parent
e3d534b2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
4 deletions
+4
-4
sync.go
pkg/controller/deployment/sync.go
+1
-1
rolling_updater_test.go
pkg/kubectl/rolling_updater_test.go
+1
-1
procfs_fake.go
pkg/util/procfs/procfs_fake.go
+1
-1
procfs_linux.go
pkg/util/procfs/procfs_linux.go
+1
-1
No files found.
pkg/controller/deployment/sync.go
View file @
932ece5c
...
...
@@ -557,7 +557,7 @@ func calculateStatus(allRSs []*extensions.ReplicaSet, newRS *extensions.ReplicaS
totalReplicas
:=
deploymentutil
.
GetReplicaCountForReplicaSets
(
allRSs
)
unavailableReplicas
:=
totalReplicas
-
availableReplicas
// If unavailableReplicas is negative, then that means the Deployment has more available replicas running than
// desired, eg. whenever it scales down. In such a case we should simply default unavailableReplicas to zero.
// desired, e
.
g. whenever it scales down. In such a case we should simply default unavailableReplicas to zero.
if
unavailableReplicas
<
0
{
unavailableReplicas
=
0
}
...
...
pkg/kubectl/rolling_updater_test.go
View file @
932ece5c
...
...
@@ -1654,7 +1654,7 @@ func TestRollingUpdater_readyPods(t *testing.T) {
oldPods
[]
bool
newPods
[]
bool
// deletions - should be less then the size of the respective slice above
// eg. len(oldPods) > oldPodDeletions && len(newPods) > newPodDeletions
// e
.
g. len(oldPods) > oldPodDeletions && len(newPods) > newPodDeletions
oldPodDeletions
int
newPodDeletions
int
// specify additional time to wait for deployment to wait on top of the
...
...
pkg/util/procfs/procfs_fake.go
View file @
932ece5c
...
...
@@ -23,7 +23,7 @@ func NewFakeProcFS() ProcFSInterface {
}
// GetFullContainerName gets the container name given the root process id of the container.
// E
g. I
f the devices cgroup for the container is stored in /sys/fs/cgroup/devices/docker/nginx,
// E
.g. i
f the devices cgroup for the container is stored in /sys/fs/cgroup/devices/docker/nginx,
// return docker/nginx. Assumes that the process is part of exactly one cgroup hierarchy.
func
(
fakePfs
*
FakeProcFS
)
GetFullContainerName
(
pid
int
)
(
string
,
error
)
{
return
""
,
nil
...
...
pkg/util/procfs/procfs_linux.go
View file @
932ece5c
...
...
@@ -53,7 +53,7 @@ func containerNameFromProcCgroup(content string) (string, error) {
}
// getFullContainerName gets the container name given the root process id of the container.
// E
g. I
f the devices cgroup for the container is stored in /sys/fs/cgroup/devices/docker/nginx,
// E
.g. i
f the devices cgroup for the container is stored in /sys/fs/cgroup/devices/docker/nginx,
// return docker/nginx. Assumes that the process is part of exactly one cgroup hierarchy.
func
(
pfs
*
ProcFS
)
GetFullContainerName
(
pid
int
)
(
string
,
error
)
{
filePath
:=
path
.
Join
(
"/proc"
,
strconv
.
Itoa
(
pid
),
"cgroup"
)
...
...
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