Merge pull request #100842 from ravisantoshgudimetla/add-minReadySeconds-ss

api: Add min ready seconds & availablereplicas for statefulsets

Kubernetes-commit: a98d3d0700f6bea05711260d67603accb23ad143
This commit is contained in:
Kubernetes Publisher 2021-05-26 13:45:50 -07:00
commit ccac415190
10 changed files with 77 additions and 5 deletions

2
Godeps/Godeps.json generated
View File

@ -480,7 +480,7 @@
},
{
"ImportPath": "k8s.io/api",
"Rev": "c1965f366614"
"Rev": "b0d9a0e45e6f"
},
{
"ImportPath": "k8s.io/apimachinery",

View File

@ -35,6 +35,7 @@ type StatefulSetSpecApplyConfiguration struct {
PodManagementPolicy *appsv1.PodManagementPolicyType `json:"podManagementPolicy,omitempty"`
UpdateStrategy *StatefulSetUpdateStrategyApplyConfiguration `json:"updateStrategy,omitempty"`
RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty"`
MinReadySeconds *int32 `json:"minReadySeconds,omitempty"`
}
// StatefulSetSpecApplyConfiguration constructs an declarative configuration of the StatefulSetSpec type for use with
@ -111,3 +112,11 @@ func (b *StatefulSetSpecApplyConfiguration) WithRevisionHistoryLimit(value int32
b.RevisionHistoryLimit = &value
return b
}
// WithMinReadySeconds sets the MinReadySeconds field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the MinReadySeconds field is set to the value of the last call.
func (b *StatefulSetSpecApplyConfiguration) WithMinReadySeconds(value int32) *StatefulSetSpecApplyConfiguration {
b.MinReadySeconds = &value
return b
}

View File

@ -30,6 +30,7 @@ type StatefulSetStatusApplyConfiguration struct {
UpdateRevision *string `json:"updateRevision,omitempty"`
CollisionCount *int32 `json:"collisionCount,omitempty"`
Conditions []StatefulSetConditionApplyConfiguration `json:"conditions,omitempty"`
AvailableReplicas *int32 `json:"availableReplicas,omitempty"`
}
// StatefulSetStatusApplyConfiguration constructs an declarative configuration of the StatefulSetStatus type for use with
@ -114,3 +115,11 @@ func (b *StatefulSetStatusApplyConfiguration) WithConditions(values ...*Stateful
}
return b
}
// WithAvailableReplicas sets the AvailableReplicas field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the AvailableReplicas field is set to the value of the last call.
func (b *StatefulSetStatusApplyConfiguration) WithAvailableReplicas(value int32) *StatefulSetStatusApplyConfiguration {
b.AvailableReplicas = &value
return b
}

View File

@ -35,6 +35,7 @@ type StatefulSetSpecApplyConfiguration struct {
PodManagementPolicy *v1beta1.PodManagementPolicyType `json:"podManagementPolicy,omitempty"`
UpdateStrategy *StatefulSetUpdateStrategyApplyConfiguration `json:"updateStrategy,omitempty"`
RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty"`
MinReadySeconds *int32 `json:"minReadySeconds,omitempty"`
}
// StatefulSetSpecApplyConfiguration constructs an declarative configuration of the StatefulSetSpec type for use with
@ -111,3 +112,11 @@ func (b *StatefulSetSpecApplyConfiguration) WithRevisionHistoryLimit(value int32
b.RevisionHistoryLimit = &value
return b
}
// WithMinReadySeconds sets the MinReadySeconds field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the MinReadySeconds field is set to the value of the last call.
func (b *StatefulSetSpecApplyConfiguration) WithMinReadySeconds(value int32) *StatefulSetSpecApplyConfiguration {
b.MinReadySeconds = &value
return b
}

View File

@ -30,6 +30,7 @@ type StatefulSetStatusApplyConfiguration struct {
UpdateRevision *string `json:"updateRevision,omitempty"`
CollisionCount *int32 `json:"collisionCount,omitempty"`
Conditions []StatefulSetConditionApplyConfiguration `json:"conditions,omitempty"`
AvailableReplicas *int32 `json:"availableReplicas,omitempty"`
}
// StatefulSetStatusApplyConfiguration constructs an declarative configuration of the StatefulSetStatus type for use with
@ -114,3 +115,11 @@ func (b *StatefulSetStatusApplyConfiguration) WithConditions(values ...*Stateful
}
return b
}
// WithAvailableReplicas sets the AvailableReplicas field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the AvailableReplicas field is set to the value of the last call.
func (b *StatefulSetStatusApplyConfiguration) WithAvailableReplicas(value int32) *StatefulSetStatusApplyConfiguration {
b.AvailableReplicas = &value
return b
}

View File

@ -35,6 +35,7 @@ type StatefulSetSpecApplyConfiguration struct {
PodManagementPolicy *v1beta2.PodManagementPolicyType `json:"podManagementPolicy,omitempty"`
UpdateStrategy *StatefulSetUpdateStrategyApplyConfiguration `json:"updateStrategy,omitempty"`
RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty"`
MinReadySeconds *int32 `json:"minReadySeconds,omitempty"`
}
// StatefulSetSpecApplyConfiguration constructs an declarative configuration of the StatefulSetSpec type for use with
@ -111,3 +112,11 @@ func (b *StatefulSetSpecApplyConfiguration) WithRevisionHistoryLimit(value int32
b.RevisionHistoryLimit = &value
return b
}
// WithMinReadySeconds sets the MinReadySeconds field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the MinReadySeconds field is set to the value of the last call.
func (b *StatefulSetSpecApplyConfiguration) WithMinReadySeconds(value int32) *StatefulSetSpecApplyConfiguration {
b.MinReadySeconds = &value
return b
}

View File

@ -30,6 +30,7 @@ type StatefulSetStatusApplyConfiguration struct {
UpdateRevision *string `json:"updateRevision,omitempty"`
CollisionCount *int32 `json:"collisionCount,omitempty"`
Conditions []StatefulSetConditionApplyConfiguration `json:"conditions,omitempty"`
AvailableReplicas *int32 `json:"availableReplicas,omitempty"`
}
// StatefulSetStatusApplyConfiguration constructs an declarative configuration of the StatefulSetStatus type for use with
@ -114,3 +115,11 @@ func (b *StatefulSetStatusApplyConfiguration) WithConditions(values ...*Stateful
}
return b
}
// WithAvailableReplicas sets the AvailableReplicas field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the AvailableReplicas field is set to the value of the last call.
func (b *StatefulSetStatusApplyConfiguration) WithAvailableReplicas(value int32) *StatefulSetStatusApplyConfiguration {
b.AvailableReplicas = &value
return b
}

View File

@ -910,6 +910,9 @@ var schemaYAML = typed.YAMLObject(`types:
- name: io.k8s.api.apps.v1.StatefulSetSpec
map:
fields:
- name: minReadySeconds
type:
scalar: numeric
- name: podManagementPolicy
type:
scalar: string
@ -943,6 +946,9 @@ var schemaYAML = typed.YAMLObject(`types:
- name: io.k8s.api.apps.v1.StatefulSetStatus
map:
fields:
- name: availableReplicas
type:
scalar: numeric
- name: collisionCount
type:
scalar: numeric
@ -1191,6 +1197,9 @@ var schemaYAML = typed.YAMLObject(`types:
- name: io.k8s.api.apps.v1beta1.StatefulSetSpec
map:
fields:
- name: minReadySeconds
type:
scalar: numeric
- name: podManagementPolicy
type:
scalar: string
@ -1224,6 +1233,9 @@ var schemaYAML = typed.YAMLObject(`types:
- name: io.k8s.api.apps.v1beta1.StatefulSetStatus
map:
fields:
- name: availableReplicas
type:
scalar: numeric
- name: collisionCount
type:
scalar: numeric
@ -1670,6 +1682,9 @@ var schemaYAML = typed.YAMLObject(`types:
- name: io.k8s.api.apps.v1beta2.StatefulSetSpec
map:
fields:
- name: minReadySeconds
type:
scalar: numeric
- name: podManagementPolicy
type:
scalar: string
@ -1703,6 +1718,9 @@ var schemaYAML = typed.YAMLObject(`types:
- name: io.k8s.api.apps.v1beta2.StatefulSetStatus
map:
fields:
- name: availableReplicas
type:
scalar: numeric
- name: collisionCount
type:
scalar: numeric

4
go.mod
View File

@ -28,7 +28,7 @@ require (
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d
golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba
google.golang.org/protobuf v1.25.0
k8s.io/api v0.0.0-20210526145656-c1965f366614
k8s.io/api v0.0.0-20210526225344-b0d9a0e45e6f
k8s.io/apimachinery v0.0.0-20210526145310-44113beed5d3
k8s.io/klog/v2 v2.9.0
k8s.io/utils v0.0.0-20201110183641-67b214c5f920
@ -37,6 +37,6 @@ require (
)
replace (
k8s.io/api => k8s.io/api v0.0.0-20210526145656-c1965f366614
k8s.io/api => k8s.io/api v0.0.0-20210526225344-b0d9a0e45e6f
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20210526145310-44113beed5d3
)

4
go.sum
View File

@ -437,8 +437,8 @@ honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWh
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
k8s.io/api v0.0.0-20210526145656-c1965f366614 h1:dtbswgrsOmr2QNHHLs4Paz6zOMQpjQRageoUbsdIrsA=
k8s.io/api v0.0.0-20210526145656-c1965f366614/go.mod h1:eWIkn4RdojmLDA8CIg8qxYIu2OMC0e1fQw5tIpdntMo=
k8s.io/api v0.0.0-20210526225344-b0d9a0e45e6f h1:RltThoVZBYapPUF5y7XS/5Nyf+l05lf0zLUQEm6YJBw=
k8s.io/api v0.0.0-20210526225344-b0d9a0e45e6f/go.mod h1:eWIkn4RdojmLDA8CIg8qxYIu2OMC0e1fQw5tIpdntMo=
k8s.io/apimachinery v0.0.0-20210526145310-44113beed5d3 h1:EackAoZYmz9kh+g/lsA1j+zXT594K8sow0aZsaTGrpY=
k8s.io/apimachinery v0.0.0-20210526145310-44113beed5d3/go.mod h1:4Cv2ieSta05uBKxq3lhGnvQDmwXVxNYosMEyZpoDRoA=
k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=