API: maxUnavailable for StatefulSet

Kubernetes-commit: 357203d992bb9b0cf9685f878d8635cf3277bef9
This commit is contained in:
Mayank Kumar 2019-08-30 00:05:18 -07:00 committed by Kubernetes Publisher
parent 402aa66c5c
commit 1a9591bb97
4 changed files with 51 additions and 3 deletions

View File

@ -18,10 +18,15 @@ limitations under the License.
package v1 package v1
import (
intstr "k8s.io/apimachinery/pkg/util/intstr"
)
// RollingUpdateStatefulSetStrategyApplyConfiguration represents an declarative configuration of the RollingUpdateStatefulSetStrategy type for use // RollingUpdateStatefulSetStrategyApplyConfiguration represents an declarative configuration of the RollingUpdateStatefulSetStrategy type for use
// with apply. // with apply.
type RollingUpdateStatefulSetStrategyApplyConfiguration struct { type RollingUpdateStatefulSetStrategyApplyConfiguration struct {
Partition *int32 `json:"partition,omitempty"` Partition *int32 `json:"partition,omitempty"`
MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"`
} }
// RollingUpdateStatefulSetStrategyApplyConfiguration constructs an declarative configuration of the RollingUpdateStatefulSetStrategy type for use with // RollingUpdateStatefulSetStrategyApplyConfiguration constructs an declarative configuration of the RollingUpdateStatefulSetStrategy type for use with
@ -37,3 +42,11 @@ func (b *RollingUpdateStatefulSetStrategyApplyConfiguration) WithPartition(value
b.Partition = &value b.Partition = &value
return b return b
} }
// WithMaxUnavailable sets the MaxUnavailable 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 MaxUnavailable field is set to the value of the last call.
func (b *RollingUpdateStatefulSetStrategyApplyConfiguration) WithMaxUnavailable(value intstr.IntOrString) *RollingUpdateStatefulSetStrategyApplyConfiguration {
b.MaxUnavailable = &value
return b
}

View File

@ -18,10 +18,15 @@ limitations under the License.
package v1beta1 package v1beta1
import (
intstr "k8s.io/apimachinery/pkg/util/intstr"
)
// RollingUpdateStatefulSetStrategyApplyConfiguration represents an declarative configuration of the RollingUpdateStatefulSetStrategy type for use // RollingUpdateStatefulSetStrategyApplyConfiguration represents an declarative configuration of the RollingUpdateStatefulSetStrategy type for use
// with apply. // with apply.
type RollingUpdateStatefulSetStrategyApplyConfiguration struct { type RollingUpdateStatefulSetStrategyApplyConfiguration struct {
Partition *int32 `json:"partition,omitempty"` Partition *int32 `json:"partition,omitempty"`
MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"`
} }
// RollingUpdateStatefulSetStrategyApplyConfiguration constructs an declarative configuration of the RollingUpdateStatefulSetStrategy type for use with // RollingUpdateStatefulSetStrategyApplyConfiguration constructs an declarative configuration of the RollingUpdateStatefulSetStrategy type for use with
@ -37,3 +42,11 @@ func (b *RollingUpdateStatefulSetStrategyApplyConfiguration) WithPartition(value
b.Partition = &value b.Partition = &value
return b return b
} }
// WithMaxUnavailable sets the MaxUnavailable 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 MaxUnavailable field is set to the value of the last call.
func (b *RollingUpdateStatefulSetStrategyApplyConfiguration) WithMaxUnavailable(value intstr.IntOrString) *RollingUpdateStatefulSetStrategyApplyConfiguration {
b.MaxUnavailable = &value
return b
}

View File

@ -18,10 +18,15 @@ limitations under the License.
package v1beta2 package v1beta2
import (
intstr "k8s.io/apimachinery/pkg/util/intstr"
)
// RollingUpdateStatefulSetStrategyApplyConfiguration represents an declarative configuration of the RollingUpdateStatefulSetStrategy type for use // RollingUpdateStatefulSetStrategyApplyConfiguration represents an declarative configuration of the RollingUpdateStatefulSetStrategy type for use
// with apply. // with apply.
type RollingUpdateStatefulSetStrategyApplyConfiguration struct { type RollingUpdateStatefulSetStrategyApplyConfiguration struct {
Partition *int32 `json:"partition,omitempty"` Partition *int32 `json:"partition,omitempty"`
MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"`
} }
// RollingUpdateStatefulSetStrategyApplyConfiguration constructs an declarative configuration of the RollingUpdateStatefulSetStrategy type for use with // RollingUpdateStatefulSetStrategyApplyConfiguration constructs an declarative configuration of the RollingUpdateStatefulSetStrategy type for use with
@ -37,3 +42,11 @@ func (b *RollingUpdateStatefulSetStrategyApplyConfiguration) WithPartition(value
b.Partition = &value b.Partition = &value
return b return b
} }
// WithMaxUnavailable sets the MaxUnavailable 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 MaxUnavailable field is set to the value of the last call.
func (b *RollingUpdateStatefulSetStrategyApplyConfiguration) WithMaxUnavailable(value intstr.IntOrString) *RollingUpdateStatefulSetStrategyApplyConfiguration {
b.MaxUnavailable = &value
return b
}

View File

@ -862,6 +862,9 @@ var schemaYAML = typed.YAMLObject(`types:
- name: io.k8s.api.apps.v1.RollingUpdateStatefulSetStrategy - name: io.k8s.api.apps.v1.RollingUpdateStatefulSetStrategy
map: map:
fields: fields:
- name: maxUnavailable
type:
namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString
- name: partition - name: partition
type: type:
scalar: numeric scalar: numeric
@ -1162,6 +1165,9 @@ var schemaYAML = typed.YAMLObject(`types:
- name: io.k8s.api.apps.v1beta1.RollingUpdateStatefulSetStrategy - name: io.k8s.api.apps.v1beta1.RollingUpdateStatefulSetStrategy
map: map:
fields: fields:
- name: maxUnavailable
type:
namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString
- name: partition - name: partition
type: type:
scalar: numeric scalar: numeric
@ -1660,6 +1666,9 @@ var schemaYAML = typed.YAMLObject(`types:
- name: io.k8s.api.apps.v1beta2.RollingUpdateStatefulSetStrategy - name: io.k8s.api.apps.v1beta2.RollingUpdateStatefulSetStrategy
map: map:
fields: fields:
- name: maxUnavailable
type:
namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString
- name: partition - name: partition
type: type:
scalar: numeric scalar: numeric