mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Merge pull request #104045 from ravisantoshgudimetla/promote-minReadySec-sts-beta
Promote min ready sec sts beta
This commit is contained in:
commit
62a6df9e0b
5
api/openapi-spec/swagger.json
generated
5
api/openapi-spec/swagger.json
generated
@ -1367,7 +1367,7 @@
|
||||
"description": "StatefulSetStatus represents the current state of a StatefulSet.",
|
||||
"properties": {
|
||||
"availableReplicas": {
|
||||
"description": "Total number of available pods (ready for at least minReadySeconds) targeted by this statefulset. This is an alpha field and requires enabling StatefulSetMinReadySeconds feature gate. Remove omitempty when graduating to beta",
|
||||
"description": "Total number of available pods (ready for at least minReadySeconds) targeted by this statefulset. This is a beta field and enabled/disabled by StatefulSetMinReadySeconds feature gate.",
|
||||
"format": "int32",
|
||||
"type": "integer"
|
||||
},
|
||||
@ -1420,7 +1420,8 @@
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"replicas"
|
||||
"replicas",
|
||||
"availableReplicas"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
|
@ -205,9 +205,7 @@ type StatefulSetStatus struct {
|
||||
Conditions []StatefulSetCondition
|
||||
|
||||
// Total number of available pods (ready for at least minReadySeconds) targeted by this statefulset.
|
||||
// This is an alpha field and requires enabling StatefulSetMinReadySeconds feature gate.
|
||||
// Remove omitempty when graduating to beta
|
||||
// +optional
|
||||
// This is a beta field and requires enabling StatefulSetMinReadySeconds feature gate.
|
||||
AvailableReplicas int32
|
||||
}
|
||||
|
||||
|
@ -708,8 +708,9 @@ const (
|
||||
WindowsHostProcessContainers featuregate.Feature = "WindowsHostProcessContainers"
|
||||
|
||||
// owner: @ravig
|
||||
// kep: https://kep.k8s.io/2607
|
||||
// alpha: v1.22
|
||||
//
|
||||
// beta: v1.23
|
||||
// StatefulSetMinReadySeconds allows minReadySeconds to be respected by StatefulSet controller
|
||||
StatefulSetMinReadySeconds featuregate.Feature = "StatefulSetMinReadySeconds"
|
||||
|
||||
@ -875,7 +876,7 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS
|
||||
WindowsHostProcessContainers: {Default: false, PreRelease: featuregate.Alpha},
|
||||
DisableCloudProviders: {Default: false, PreRelease: featuregate.Alpha},
|
||||
DisableKubeletCloudCredentialProviders: {Default: false, PreRelease: featuregate.Alpha},
|
||||
StatefulSetMinReadySeconds: {Default: false, PreRelease: featuregate.Alpha},
|
||||
StatefulSetMinReadySeconds: {Default: true, PreRelease: featuregate.Beta},
|
||||
ExpandedDNSConfig: {Default: false, PreRelease: featuregate.Alpha},
|
||||
SeccompDefault: {Default: false, PreRelease: featuregate.Alpha},
|
||||
PodSecurity: {Default: false, PreRelease: featuregate.Alpha},
|
||||
|
@ -721,9 +721,7 @@ message StatefulSetStatus {
|
||||
repeated StatefulSetCondition conditions = 10;
|
||||
|
||||
// Total number of available pods (ready for at least minReadySeconds) targeted by this statefulset.
|
||||
// This is an alpha field and requires enabling StatefulSetMinReadySeconds feature gate.
|
||||
// Remove omitempty when graduating to beta
|
||||
// +optional
|
||||
// This is a beta field and enabled/disabled by StatefulSetMinReadySeconds feature gate.
|
||||
optional int32 availableReplicas = 11;
|
||||
}
|
||||
|
||||
|
@ -226,10 +226,8 @@ type StatefulSetStatus struct {
|
||||
Conditions []StatefulSetCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,10,rep,name=conditions"`
|
||||
|
||||
// Total number of available pods (ready for at least minReadySeconds) targeted by this statefulset.
|
||||
// This is an alpha field and requires enabling StatefulSetMinReadySeconds feature gate.
|
||||
// Remove omitempty when graduating to beta
|
||||
// +optional
|
||||
AvailableReplicas int32 `json:"availableReplicas,omitempty" protobuf:"varint,11,opt,name=availableReplicas"`
|
||||
// This is a beta field and enabled/disabled by StatefulSetMinReadySeconds feature gate.
|
||||
AvailableReplicas int32 `json:"availableReplicas" protobuf:"varint,11,opt,name=availableReplicas"`
|
||||
}
|
||||
|
||||
type StatefulSetConditionType string
|
||||
|
@ -351,7 +351,7 @@ var map_StatefulSetStatus = map[string]string{
|
||||
"updateRevision": "updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [replicas-updatedReplicas,replicas)",
|
||||
"collisionCount": "collisionCount is the count of hash collisions for the StatefulSet. The StatefulSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision.",
|
||||
"conditions": "Represents the latest available observations of a statefulset's current state.",
|
||||
"availableReplicas": "Total number of available pods (ready for at least minReadySeconds) targeted by this statefulset. This is an alpha field and requires enabling StatefulSetMinReadySeconds feature gate. Remove omitempty when graduating to beta",
|
||||
"availableReplicas": "Total number of available pods (ready for at least minReadySeconds) targeted by this statefulset. This is a beta field and enabled/disabled by StatefulSetMinReadySeconds feature gate.",
|
||||
}
|
||||
|
||||
func (StatefulSetStatus) SwaggerDoc() map[string]string {
|
||||
|
@ -478,9 +478,7 @@ message StatefulSetStatus {
|
||||
repeated StatefulSetCondition conditions = 10;
|
||||
|
||||
// Total number of available pods (ready for at least minReadySeconds) targeted by this StatefulSet.
|
||||
// This is an alpha field and requires enabling StatefulSetMinReadySeconds feature gate.
|
||||
// Remove omitempty when graduating to beta
|
||||
// +optional
|
||||
// This is a beta field and enabled/disabled by StatefulSetMinReadySeconds feature gate.
|
||||
optional int32 availableReplicas = 11;
|
||||
}
|
||||
|
||||
|
@ -269,10 +269,8 @@ type StatefulSetStatus struct {
|
||||
Conditions []StatefulSetCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,10,rep,name=conditions"`
|
||||
|
||||
// Total number of available pods (ready for at least minReadySeconds) targeted by this StatefulSet.
|
||||
// This is an alpha field and requires enabling StatefulSetMinReadySeconds feature gate.
|
||||
// Remove omitempty when graduating to beta
|
||||
// +optional
|
||||
AvailableReplicas int32 `json:"availableReplicas,omitempty" protobuf:"varint,11,opt,name=availableReplicas"`
|
||||
// This is a beta field and enabled/disabled by StatefulSetMinReadySeconds feature gate.
|
||||
AvailableReplicas int32 `json:"availableReplicas" protobuf:"varint,11,opt,name=availableReplicas"`
|
||||
}
|
||||
|
||||
type StatefulSetConditionType string
|
||||
|
@ -255,7 +255,7 @@ var map_StatefulSetStatus = map[string]string{
|
||||
"updateRevision": "updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [replicas-updatedReplicas,replicas)",
|
||||
"collisionCount": "collisionCount is the count of hash collisions for the StatefulSet. The StatefulSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision.",
|
||||
"conditions": "Represents the latest available observations of a statefulset's current state.",
|
||||
"availableReplicas": "Total number of available pods (ready for at least minReadySeconds) targeted by this StatefulSet. This is an alpha field and requires enabling StatefulSetMinReadySeconds feature gate. Remove omitempty when graduating to beta",
|
||||
"availableReplicas": "Total number of available pods (ready for at least minReadySeconds) targeted by this StatefulSet. This is a beta field and enabled/disabled by StatefulSetMinReadySeconds feature gate.",
|
||||
}
|
||||
|
||||
func (StatefulSetStatus) SwaggerDoc() map[string]string {
|
||||
|
@ -766,9 +766,7 @@ message StatefulSetStatus {
|
||||
repeated StatefulSetCondition conditions = 10;
|
||||
|
||||
// Total number of available pods (ready for at least minReadySeconds) targeted by this StatefulSet.
|
||||
// This is an alpha field and requires enabling StatefulSetMinReadySeconds feature gate.
|
||||
// Remove omitempty when graduating to beta
|
||||
// +optional
|
||||
// This is a beta field and enabled/disabled by StatefulSetMinReadySeconds feature gate.
|
||||
optional int32 availableReplicas = 11;
|
||||
}
|
||||
|
||||
|
@ -279,10 +279,8 @@ type StatefulSetStatus struct {
|
||||
Conditions []StatefulSetCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,10,rep,name=conditions"`
|
||||
|
||||
// Total number of available pods (ready for at least minReadySeconds) targeted by this StatefulSet.
|
||||
// This is an alpha field and requires enabling StatefulSetMinReadySeconds feature gate.
|
||||
// Remove omitempty when graduating to beta
|
||||
// +optional
|
||||
AvailableReplicas int32 `json:"availableReplicas,omitempty" protobuf:"varint,11,opt,name=availableReplicas"`
|
||||
// This is a beta field and enabled/disabled by StatefulSetMinReadySeconds feature gate.
|
||||
AvailableReplicas int32 `json:"availableReplicas" protobuf:"varint,11,opt,name=availableReplicas"`
|
||||
}
|
||||
|
||||
type StatefulSetConditionType string
|
||||
|
@ -379,7 +379,7 @@ var map_StatefulSetStatus = map[string]string{
|
||||
"updateRevision": "updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [replicas-updatedReplicas,replicas)",
|
||||
"collisionCount": "collisionCount is the count of hash collisions for the StatefulSet. The StatefulSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision.",
|
||||
"conditions": "Represents the latest available observations of a statefulset's current state.",
|
||||
"availableReplicas": "Total number of available pods (ready for at least minReadySeconds) targeted by this StatefulSet. This is an alpha field and requires enabling StatefulSetMinReadySeconds feature gate. Remove omitempty when graduating to beta",
|
||||
"availableReplicas": "Total number of available pods (ready for at least minReadySeconds) targeted by this StatefulSet. This is a beta field and enabled/disabled by StatefulSetMinReadySeconds feature gate.",
|
||||
}
|
||||
|
||||
func (StatefulSetStatus) SwaggerDoc() map[string]string {
|
||||
|
1668
staging/src/k8s.io/api/testdata/v1.21.0/apps.v1.StatefulSet.after_roundtrip.json
vendored
Normal file
1668
staging/src/k8s.io/api/testdata/v1.21.0/apps.v1.StatefulSet.after_roundtrip.json
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1139
staging/src/k8s.io/api/testdata/v1.21.0/apps.v1.StatefulSet.after_roundtrip.yaml
vendored
Normal file
1139
staging/src/k8s.io/api/testdata/v1.21.0/apps.v1.StatefulSet.after_roundtrip.yaml
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1668
staging/src/k8s.io/api/testdata/v1.21.0/apps.v1beta1.StatefulSet.after_roundtrip.json
vendored
Normal file
1668
staging/src/k8s.io/api/testdata/v1.21.0/apps.v1beta1.StatefulSet.after_roundtrip.json
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1139
staging/src/k8s.io/api/testdata/v1.21.0/apps.v1beta1.StatefulSet.after_roundtrip.yaml
vendored
Normal file
1139
staging/src/k8s.io/api/testdata/v1.21.0/apps.v1beta1.StatefulSet.after_roundtrip.yaml
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1668
staging/src/k8s.io/api/testdata/v1.21.0/apps.v1beta2.StatefulSet.after_roundtrip.json
vendored
Normal file
1668
staging/src/k8s.io/api/testdata/v1.21.0/apps.v1beta2.StatefulSet.after_roundtrip.json
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1139
staging/src/k8s.io/api/testdata/v1.21.0/apps.v1beta2.StatefulSet.after_roundtrip.yaml
vendored
Normal file
1139
staging/src/k8s.io/api/testdata/v1.21.0/apps.v1beta2.StatefulSet.after_roundtrip.yaml
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@ -949,6 +949,7 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
- name: availableReplicas
|
||||
type:
|
||||
scalar: numeric
|
||||
default: 0
|
||||
- name: collisionCount
|
||||
type:
|
||||
scalar: numeric
|
||||
@ -1236,6 +1237,7 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
- name: availableReplicas
|
||||
type:
|
||||
scalar: numeric
|
||||
default: 0
|
||||
- name: collisionCount
|
||||
type:
|
||||
scalar: numeric
|
||||
@ -1721,6 +1723,7 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
- name: availableReplicas
|
||||
type:
|
||||
scalar: numeric
|
||||
default: 0
|
||||
- name: collisionCount
|
||||
type:
|
||||
scalar: numeric
|
||||
|
@ -1140,7 +1140,7 @@ var _ = SIGDescribe("StatefulSet", func() {
|
||||
})
|
||||
// Make sure minReadySeconds is honored
|
||||
// Don't mark it as conformance yet
|
||||
ginkgo.It("MinReadySeconds should be honored when enabled [Feature:StatefulSetMinReadySeconds] [alpha]", func() {
|
||||
ginkgo.It("MinReadySeconds should be honored when enabled", func() {
|
||||
ssName := "test-ss"
|
||||
headlessSvcName := "test"
|
||||
// Define StatefulSet Labels
|
||||
|
Loading…
Reference in New Issue
Block a user