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
2098cc26
Commit
2098cc26
authored
Jul 26, 2017
by
Di Xu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change the StatefulSet observedGeneration from a pointer to an int for consistency
parent
60007128
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
1 deletion
+31
-1
fuzzer.go
pkg/api/testing/fuzzer.go
+3
-0
conversion.go
pkg/apis/apps/v1beta2/conversion.go
+27
-0
types.go
staging/src/k8s.io/api/apps/v1beta2/types.go
+1
-1
No files found.
pkg/api/testing/fuzzer.go
View file @
2098cc26
...
@@ -731,6 +731,9 @@ func appsFuncs(codecs runtimeserializer.CodecFactory) []interface{} {
...
@@ -731,6 +731,9 @@ func appsFuncs(codecs runtimeserializer.CodecFactory) []interface{} {
s
.
Spec
.
RevisionHistoryLimit
=
new
(
int32
)
s
.
Spec
.
RevisionHistoryLimit
=
new
(
int32
)
*
s
.
Spec
.
RevisionHistoryLimit
=
10
*
s
.
Spec
.
RevisionHistoryLimit
=
10
}
}
if
s
.
Status
.
ObservedGeneration
==
nil
{
s
.
Status
.
ObservedGeneration
=
new
(
int64
)
}
},
},
}
}
}
}
...
...
pkg/apis/apps/v1beta2/conversion.go
View file @
2098cc26
...
@@ -43,6 +43,8 @@ func addConversionFuncs(scheme *runtime.Scheme) error {
...
@@ -43,6 +43,8 @@ func addConversionFuncs(scheme *runtime.Scheme) error {
Convert_apps_StatefulSetUpdateStrategy_To_v1beta2_StatefulSetUpdateStrategy
,
Convert_apps_StatefulSetUpdateStrategy_To_v1beta2_StatefulSetUpdateStrategy
,
Convert_extensions_RollingUpdateDaemonSet_To_v1beta2_RollingUpdateDaemonSet
,
Convert_extensions_RollingUpdateDaemonSet_To_v1beta2_RollingUpdateDaemonSet
,
Convert_v1beta2_RollingUpdateDaemonSet_To_extensions_RollingUpdateDaemonSet
,
Convert_v1beta2_RollingUpdateDaemonSet_To_extensions_RollingUpdateDaemonSet
,
Convert_v1beta2_StatefulSetStatus_To_apps_StatefulSetStatus
,
Convert_apps_StatefulSetStatus_To_v1beta2_StatefulSetStatus
,
// extensions
// extensions
// TODO: below conversions should be dropped in favor of auto-generated
// TODO: below conversions should be dropped in favor of auto-generated
// ones, see https://github.com/kubernetes/kubernetes/issues/39865
// ones, see https://github.com/kubernetes/kubernetes/issues/39865
...
@@ -223,6 +225,31 @@ func Convert_apps_StatefulSetUpdateStrategy_To_v1beta2_StatefulSetUpdateStrategy
...
@@ -223,6 +225,31 @@ func Convert_apps_StatefulSetUpdateStrategy_To_v1beta2_StatefulSetUpdateStrategy
return
nil
return
nil
}
}
func
Convert_v1beta2_StatefulSetStatus_To_apps_StatefulSetStatus
(
in
*
appsv1beta2
.
StatefulSetStatus
,
out
*
apps
.
StatefulSetStatus
,
s
conversion
.
Scope
)
error
{
out
.
ObservedGeneration
=
new
(
int64
)
*
out
.
ObservedGeneration
=
in
.
ObservedGeneration
out
.
Replicas
=
in
.
Replicas
out
.
ReadyReplicas
=
in
.
ReadyReplicas
out
.
CurrentReplicas
=
in
.
CurrentReplicas
out
.
UpdatedReplicas
=
in
.
UpdatedReplicas
out
.
CurrentRevision
=
in
.
CurrentRevision
out
.
UpdateRevision
=
in
.
UpdateRevision
return
nil
}
func
Convert_apps_StatefulSetStatus_To_v1beta2_StatefulSetStatus
(
in
*
apps
.
StatefulSetStatus
,
out
*
appsv1beta2
.
StatefulSetStatus
,
s
conversion
.
Scope
)
error
{
if
in
.
ObservedGeneration
!=
nil
{
out
.
ObservedGeneration
=
*
in
.
ObservedGeneration
}
out
.
Replicas
=
in
.
Replicas
out
.
ReadyReplicas
=
in
.
ReadyReplicas
out
.
CurrentReplicas
=
in
.
CurrentReplicas
out
.
UpdatedReplicas
=
in
.
UpdatedReplicas
out
.
CurrentRevision
=
in
.
CurrentRevision
out
.
UpdateRevision
=
in
.
UpdateRevision
return
nil
}
func
Convert_extensions_ScaleStatus_To_v1beta2_ScaleStatus
(
in
*
extensions
.
ScaleStatus
,
out
*
appsv1beta2
.
ScaleStatus
,
s
conversion
.
Scope
)
error
{
func
Convert_extensions_ScaleStatus_To_v1beta2_ScaleStatus
(
in
*
extensions
.
ScaleStatus
,
out
*
appsv1beta2
.
ScaleStatus
,
s
conversion
.
Scope
)
error
{
out
.
Replicas
=
int32
(
in
.
Replicas
)
out
.
Replicas
=
int32
(
in
.
Replicas
)
...
...
staging/src/k8s.io/api/apps/v1beta2/types.go
View file @
2098cc26
...
@@ -225,7 +225,7 @@ type StatefulSetStatus struct {
...
@@ -225,7 +225,7 @@ type StatefulSetStatus struct {
// observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the
// observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the
// StatefulSet's generation, which is updated on mutation by the API Server.
// StatefulSet's generation, which is updated on mutation by the API Server.
// +optional
// +optional
ObservedGeneration
*
int64
`json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"`
ObservedGeneration
int64
`json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"`
// replicas is the number of Pods created by the StatefulSet controller.
// replicas is the number of Pods created by the StatefulSet controller.
Replicas
int32
`json:"replicas" protobuf:"varint,2,opt,name=replicas"`
Replicas
int32
`json:"replicas" protobuf:"varint,2,opt,name=replicas"`
...
...
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