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
7a3d4078
Commit
7a3d4078
authored
Feb 23, 2016
by
kargakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
switch internal field to int64
parent
2cb37f35
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
5 deletions
+5
-5
types.go
pkg/apis/extensions/types.go
+1
-1
validation.go
pkg/apis/extensions/validation/validation.go
+1
-1
deployment_controller.go
pkg/controller/deployment/deployment_controller.go
+2
-2
util.go
test/e2e/util.go
+1
-1
No files found.
pkg/apis/extensions/types.go
View file @
7a3d4078
...
...
@@ -333,7 +333,7 @@ type RollingUpdateDeployment struct {
type
DeploymentStatus
struct
{
// The generation observed by the deployment controller.
ObservedGeneration
int
`json:"observedGeneration,omitempty"`
ObservedGeneration
int
64
`json:"observedGeneration,omitempty"`
// Total number of non-terminated pods targeted by this deployment (their labels match the selector).
Replicas
int
`json:"replicas,omitempty"`
...
...
pkg/apis/extensions/validation/validation.go
View file @
7a3d4078
...
...
@@ -332,7 +332,7 @@ func ValidateDeploymentSpec(spec *extensions.DeploymentSpec, fldPath *field.Path
// Validates given deployment status.
func
ValidateDeploymentStatus
(
status
*
extensions
.
DeploymentStatus
,
fldPath
*
field
.
Path
)
field
.
ErrorList
{
allErrs
:=
field
.
ErrorList
{}
allErrs
=
append
(
allErrs
,
apivalidation
.
ValidateNonnegativeField
(
int64
(
status
.
ObservedGeneration
)
,
fldPath
.
Child
(
"observedGeneration"
))
...
)
allErrs
=
append
(
allErrs
,
apivalidation
.
ValidateNonnegativeField
(
status
.
ObservedGeneration
,
fldPath
.
Child
(
"observedGeneration"
))
...
)
allErrs
=
append
(
allErrs
,
apivalidation
.
ValidateNonnegativeField
(
int64
(
status
.
Replicas
),
fldPath
.
Child
(
"replicas"
))
...
)
allErrs
=
append
(
allErrs
,
apivalidation
.
ValidateNonnegativeField
(
int64
(
status
.
UpdatedReplicas
),
fldPath
.
Child
(
"updatedReplicas"
))
...
)
allErrs
=
append
(
allErrs
,
apivalidation
.
ValidateNonnegativeField
(
int64
(
status
.
AvailableReplicas
),
fldPath
.
Child
(
"availableReplicas"
))
...
)
...
...
pkg/controller/deployment/deployment_controller.go
View file @
7a3d4078
...
...
@@ -582,7 +582,7 @@ func (dc *DeploymentController) syncDeploymentStatus(allRSs []*extensions.Replic
if
err
!=
nil
{
return
err
}
if
d
.
Status
.
Replicas
!=
totalReplicas
||
d
.
Status
.
UpdatedReplicas
!=
updatedReplicas
||
d
.
Status
.
AvailableReplicas
!=
availableReplicas
||
int
(
d
.
Generation
)
>
d
.
Status
.
ObservedGeneration
{
if
d
.
Generation
>
d
.
Status
.
ObservedGeneration
||
d
.
Status
.
Replicas
!=
totalReplicas
||
d
.
Status
.
UpdatedReplicas
!=
updatedReplicas
||
d
.
Status
.
AvailableReplicas
!=
availableReplicas
{
return
dc
.
updateDeploymentStatus
(
allRSs
,
newRS
,
d
)
}
return
nil
...
...
@@ -1037,7 +1037,7 @@ func (dc *DeploymentController) updateDeploymentStatus(allRSs []*extensions.Repl
// TODO: Reconcile this with API definition. API definition talks about ready pods, while this just computes created pods.
newDeployment
.
Status
=
extensions
.
DeploymentStatus
{
// TODO: Ensure that if we start retrying status updates, we won't pick up a new Generation value.
ObservedGeneration
:
int
(
deployment
.
Generation
)
,
ObservedGeneration
:
deployment
.
Generation
,
Replicas
:
totalReplicas
,
UpdatedReplicas
:
updatedReplicas
,
AvailableReplicas
:
availableReplicas
,
...
...
test/e2e/util.go
View file @
7a3d4078
...
...
@@ -2192,7 +2192,7 @@ func waitForObservedDeployment(c *clientset.Clientset, ns, deploymentName string
if
err
!=
nil
{
return
false
,
err
}
return
int
(
deployment
.
Generation
)
==
deployment
.
Status
.
ObservedGeneration
,
nil
return
deployment
.
Generation
==
deployment
.
Status
.
ObservedGeneration
,
nil
})
}
...
...
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