PDB MaxUnavailable: Generated

This commit is contained in:
Anirudh
2017-05-23 07:35:35 -07:00
parent 63e51dc66e
commit 48d76edc74
28 changed files with 1262 additions and 843 deletions

View File

@@ -39,6 +39,8 @@ import math "math"
import k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
import k8s_io_apimachinery_pkg_util_intstr "k8s.io/apimachinery/pkg/util/intstr"
import strings "strings"
import reflect "reflect"
import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
@@ -216,14 +218,16 @@ func (m *PodDisruptionBudgetSpec) MarshalTo(dAtA []byte) (int, error) {
_ = i
var l int
_ = l
dAtA[i] = 0xa
i++
i = encodeVarintGenerated(dAtA, i, uint64(m.MinAvailable.Size()))
n7, err := m.MinAvailable.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
if m.MinAvailable != nil {
dAtA[i] = 0xa
i++
i = encodeVarintGenerated(dAtA, i, uint64(m.MinAvailable.Size()))
n7, err := m.MinAvailable.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n7
}
i += n7
if m.Selector != nil {
dAtA[i] = 0x12
i++
@@ -234,6 +238,16 @@ func (m *PodDisruptionBudgetSpec) MarshalTo(dAtA []byte) (int, error) {
}
i += n8
}
if m.MaxUnavailable != nil {
dAtA[i] = 0x1a
i++
i = encodeVarintGenerated(dAtA, i, uint64(m.MaxUnavailable.Size()))
n9, err := m.MaxUnavailable.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n9
}
return i, nil
}
@@ -274,11 +288,11 @@ func (m *PodDisruptionBudgetStatus) MarshalTo(dAtA []byte) (int, error) {
dAtA[i] = 0x12
i++
i = encodeVarintGenerated(dAtA, i, uint64((&v).Size()))
n9, err := (&v).MarshalTo(dAtA[i:])
n10, err := (&v).MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n9
i += n10
}
}
dAtA[i] = 0x18
@@ -364,12 +378,18 @@ func (m *PodDisruptionBudgetList) Size() (n int) {
func (m *PodDisruptionBudgetSpec) Size() (n int) {
var l int
_ = l
l = m.MinAvailable.Size()
n += 1 + l + sovGenerated(uint64(l))
if m.MinAvailable != nil {
l = m.MinAvailable.Size()
n += 1 + l + sovGenerated(uint64(l))
}
if m.Selector != nil {
l = m.Selector.Size()
n += 1 + l + sovGenerated(uint64(l))
}
if m.MaxUnavailable != nil {
l = m.MaxUnavailable.Size()
n += 1 + l + sovGenerated(uint64(l))
}
return n
}
@@ -445,8 +465,9 @@ func (this *PodDisruptionBudgetSpec) String() string {
return "nil"
}
s := strings.Join([]string{`&PodDisruptionBudgetSpec{`,
`MinAvailable:` + strings.Replace(strings.Replace(this.MinAvailable.String(), "IntOrString", "k8s_io_apimachinery_pkg_util_intstr.IntOrString", 1), `&`, ``, 1) + `,`,
`MinAvailable:` + strings.Replace(fmt.Sprintf("%v", this.MinAvailable), "IntOrString", "k8s_io_apimachinery_pkg_util_intstr.IntOrString", 1) + `,`,
`Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`,
`MaxUnavailable:` + strings.Replace(fmt.Sprintf("%v", this.MaxUnavailable), "IntOrString", "k8s_io_apimachinery_pkg_util_intstr.IntOrString", 1) + `,`,
`}`,
}, "")
return s
@@ -903,6 +924,9 @@ func (m *PodDisruptionBudgetSpec) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.MinAvailable == nil {
m.MinAvailable = &k8s_io_apimachinery_pkg_util_intstr.IntOrString{}
}
if err := m.MinAvailable.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
@@ -940,6 +964,39 @@ func (m *PodDisruptionBudgetSpec) Unmarshal(dAtA []byte) error {
return err
}
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field MaxUnavailable", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.MaxUnavailable == nil {
m.MaxUnavailable = &k8s_io_apimachinery_pkg_util_intstr.IntOrString{}
}
if err := m.MaxUnavailable.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGenerated(dAtA[iNdEx:])
@@ -1337,54 +1394,56 @@ func init() {
}
var fileDescriptorGenerated = []byte{
// 773 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x94, 0xcb, 0x6e, 0xf3, 0x44,
0x18, 0x86, 0xe3, 0x26, 0x29, 0x61, 0x9a, 0x54, 0x65, 0xa0, 0x10, 0x22, 0xe1, 0xa2, 0xac, 0x5a,
0x04, 0x63, 0xda, 0x22, 0x54, 0x58, 0x54, 0xd4, 0xa4, 0x82, 0xa2, 0x56, 0xa9, 0x5c, 0x24, 0x24,
0x04, 0x12, 0x63, 0xfb, 0xc3, 0x99, 0xc6, 0x27, 0x8d, 0xc7, 0xa1, 0xd9, 0x71, 0x09, 0x2c, 0xb8,
0xa8, 0x4a, 0x6c, 0xba, 0x44, 0x08, 0x55, 0x34, 0x70, 0x0b, 0xec, 0x91, 0xc7, 0x93, 0x83, 0x9b,
0x44, 0x0d, 0xea, 0xaf, 0x7f, 0xe7, 0x39, 0x3c, 0xef, 0xfb, 0x9d, 0xc6, 0xe8, 0x93, 0xfe, 0x51,
0x42, 0x58, 0x64, 0xf4, 0x53, 0x1b, 0x78, 0x08, 0x02, 0x12, 0x23, 0xee, 0x7b, 0x06, 0x8d, 0x59,
0x62, 0xc4, 0x91, 0x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, 0x11, 0xaa, 0xc3, 0x4d, 0x0c, 0xce,
0xb8, 0xc6, 0xeb, 0x92, 0x9e, 0x0c, 0xda, 0xe9, 0xcc, 0x99, 0x55, 0xb8, 0xd9, 0xf2, 0x11, 0x9e,
0x2f, 0x22, 0xde, 0x42, 0xe5, 0x3e, 0x0c, 0x65, 0xcb, 0x5f, 0xb5, 0xb2, 0x4f, 0xfc, 0x19, 0xaa,
0x0e, 0xa8, 0x9f, 0x82, 0x9a, 0xc6, 0xf7, 0x56, 0x9b, 0xc6, 0xaf, 0x59, 0x00, 0x56, 0x0e, 0x7e,
0xba, 0x76, 0xa4, 0x99, 0x7b, 0xb7, 0x0f, 0x7a, 0xe9, 0xee, 0x41, 0x2f, 0xfd, 0xfe, 0xa0, 0x97,
0x7e, 0x1e, 0xe9, 0xda, 0xed, 0x48, 0xd7, 0xee, 0x46, 0xba, 0xf6, 0xd7, 0x48, 0xd7, 0x7e, 0xf9,
0x5b, 0x2f, 0x7d, 0xfb, 0x8a, 0x6a, 0xfa, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x1b, 0xe9, 0x2f,
0xf1, 0x61, 0x08, 0x00, 0x00,
// 805 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x94, 0xdf, 0x6e, 0xe3, 0x44,
0x14, 0xc6, 0xe3, 0xa6, 0x29, 0x65, 0x36, 0x89, 0xca, 0xc0, 0x42, 0x89, 0x84, 0x83, 0x72, 0xb5,
0x8b, 0x60, 0x4c, 0x77, 0x11, 0x2a, 0x5c, 0xac, 0x58, 0x93, 0x0a, 0x16, 0x6d, 0xd5, 0xd5, 0x14,
0x84, 0x84, 0x40, 0x62, 0x6c, 0x9f, 0x75, 0x87, 0x8c, 0xff, 0x68, 0x3c, 0x0e, 0xcd, 0x1d, 0x8f,
0xc0, 0x05, 0x0f, 0x55, 0x09, 0x09, 0xed, 0x25, 0x42, 0x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+71,12 @@ message PodDisruptionBudgetSpec {
// Label query over pods whose evictions are managed by the disruption
// budget.
optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2;
// An eviction is allowed if at most "maxUnavailable" pods selected by
// "selector" are unavailable after the eviction, i.e. even in absence of
// the evicted pod. For example, one can prevent all voluntary evictions
// by specifying 0. This is a mutually exclusive setting with "minAvailable".
optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxUnavailable = 3;
}
// PodDisruptionBudgetStatus represents information about the status of a

View File

@@ -85,14 +85,15 @@ func (x *PodDisruptionBudgetSpec) CodecEncodeSelf(e *codec1978.Encoder) {
} else {
yysep2 := !z.EncBinary()
yy2arr2 := z.EncBasicHandle().StructToArray
var yyq2 [2]bool
var yyq2 [3]bool
_, _, _ = yysep2, yyq2, yy2arr2
const yyr2 bool = false
yyq2[0] = true
yyq2[0] = x.MinAvailable != nil
yyq2[1] = x.Selector != nil
yyq2[2] = x.MaxUnavailable != nil
var yynn2 int
if yyr2 || yy2arr2 {
r.EncodeArrayStart(2)
r.EncodeArrayStart(3)
} else {
yynn2 = 0
for _, b := range yyq2 {
@@ -106,15 +107,18 @@ func (x *PodDisruptionBudgetSpec) CodecEncodeSelf(e *codec1978.Encoder) {
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[0] {
yy4 := &x.MinAvailable
yym5 := z.EncBinary()
_ = yym5
if false {
} else if z.HasExtensions() && z.EncExt(yy4) {
} else if !yym5 && z.IsJSONHandle() {
z.EncJSONMarshal(yy4)
if x.MinAvailable == nil {
r.EncodeNil()
} else {
z.EncFallback(yy4)
yym4 := z.EncBinary()
_ = yym4
if false {
} else if z.HasExtensions() && z.EncExt(x.MinAvailable) {
} else if !yym4 && z.IsJSONHandle() {
z.EncJSONMarshal(x.MinAvailable)
} else {
z.EncFallback(x.MinAvailable)
}
}
} else {
r.EncodeNil()
@@ -124,15 +128,18 @@ func (x *PodDisruptionBudgetSpec) CodecEncodeSelf(e *codec1978.Encoder) {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("minAvailable"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yy6 := &x.MinAvailable
yym7 := z.EncBinary()
_ = yym7
if false {
} else if z.HasExtensions() && z.EncExt(yy6) {
} else if !yym7 && z.IsJSONHandle() {
z.EncJSONMarshal(yy6)
if x.MinAvailable == nil {
r.EncodeNil()
} else {
z.EncFallback(yy6)
yym5 := z.EncBinary()
_ = yym5
if false {
} else if z.HasExtensions() && z.EncExt(x.MinAvailable) {
} else if !yym5 && z.IsJSONHandle() {
z.EncJSONMarshal(x.MinAvailable)
} else {
z.EncFallback(x.MinAvailable)
}
}
}
}
@@ -142,8 +149,8 @@ func (x *PodDisruptionBudgetSpec) CodecEncodeSelf(e *codec1978.Encoder) {
if x.Selector == nil {
r.EncodeNil()
} else {
yym9 := z.EncBinary()
_ = yym9
yym7 := z.EncBinary()
_ = yym7
if false {
} else if z.HasExtensions() && z.EncExt(x.Selector) {
} else {
@@ -161,8 +168,8 @@ func (x *PodDisruptionBudgetSpec) CodecEncodeSelf(e *codec1978.Encoder) {
if x.Selector == nil {
r.EncodeNil()
} else {
yym10 := z.EncBinary()
_ = yym10
yym8 := z.EncBinary()
_ = yym8
if false {
} else if z.HasExtensions() && z.EncExt(x.Selector) {
} else {
@@ -171,6 +178,45 @@ func (x *PodDisruptionBudgetSpec) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[2] {
if x.MaxUnavailable == nil {
r.EncodeNil()
} else {
yym10 := z.EncBinary()
_ = yym10
if false {
} else if z.HasExtensions() && z.EncExt(x.MaxUnavailable) {
} else if !yym10 && z.IsJSONHandle() {
z.EncJSONMarshal(x.MaxUnavailable)
} else {
z.EncFallback(x.MaxUnavailable)
}
}
} else {
r.EncodeNil()
}
} else {
if yyq2[2] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("maxUnavailable"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if x.MaxUnavailable == nil {
r.EncodeNil()
} else {
yym11 := z.EncBinary()
_ = yym11
if false {
} else if z.HasExtensions() && z.EncExt(x.MaxUnavailable) {
} else if !yym11 && z.IsJSONHandle() {
z.EncJSONMarshal(x.MaxUnavailable)
} else {
z.EncFallback(x.MaxUnavailable)
}
}
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
@@ -234,17 +280,21 @@ func (x *PodDisruptionBudgetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Dec
switch yys3 {
case "minAvailable":
if r.TryDecodeAsNil() {
x.MinAvailable = pkg1_intstr.IntOrString{}
if x.MinAvailable != nil {
x.MinAvailable = nil
}
} else {
yyv4 := &x.MinAvailable
if x.MinAvailable == nil {
x.MinAvailable = new(pkg1_intstr.IntOrString)
}
yym5 := z.DecBinary()
_ = yym5
if false {
} else if z.HasExtensions() && z.DecExt(yyv4) {
} else if z.HasExtensions() && z.DecExt(x.MinAvailable) {
} else if !yym5 && z.IsJSONHandle() {
z.DecJSONUnmarshal(yyv4)
z.DecJSONUnmarshal(x.MinAvailable)
} else {
z.DecFallback(yyv4, false)
z.DecFallback(x.MinAvailable, false)
}
}
case "selector":
@@ -264,6 +314,25 @@ func (x *PodDisruptionBudgetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Dec
z.DecFallback(x.Selector, false)
}
}
case "maxUnavailable":
if r.TryDecodeAsNil() {
if x.MaxUnavailable != nil {
x.MaxUnavailable = nil
}
} else {
if x.MaxUnavailable == nil {
x.MaxUnavailable = new(pkg1_intstr.IntOrString)
}
yym9 := z.DecBinary()
_ = yym9
if false {
} else if z.HasExtensions() && z.DecExt(x.MaxUnavailable) {
} else if !yym9 && z.IsJSONHandle() {
z.DecJSONUnmarshal(x.MaxUnavailable)
} else {
z.DecFallback(x.MaxUnavailable, false)
}
}
default:
z.DecStructFieldNotFound(-1, yys3)
} // end switch yys3
@@ -275,41 +344,45 @@ func (x *PodDisruptionBudgetSpec) codecDecodeSelfFromArray(l int, d *codec1978.D
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj8 int
var yyb8 bool
var yyhl8 bool = l >= 0
yyj8++
if yyhl8 {
yyb8 = yyj8 > l
var yyj10 int
var yyb10 bool
var yyhl10 bool = l >= 0
yyj10++
if yyhl10 {
yyb10 = yyj10 > l
} else {
yyb8 = r.CheckBreak()
yyb10 = r.CheckBreak()
}
if yyb8 {
if yyb10 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.MinAvailable = pkg1_intstr.IntOrString{}
if x.MinAvailable != nil {
x.MinAvailable = nil
}
} else {
yyv9 := &x.MinAvailable
yym10 := z.DecBinary()
_ = yym10
if x.MinAvailable == nil {
x.MinAvailable = new(pkg1_intstr.IntOrString)
}
yym12 := z.DecBinary()
_ = yym12
if false {
} else if z.HasExtensions() && z.DecExt(yyv9) {
} else if !yym10 && z.IsJSONHandle() {
z.DecJSONUnmarshal(yyv9)
} else if z.HasExtensions() && z.DecExt(x.MinAvailable) {
} else if !yym12 && z.IsJSONHandle() {
z.DecJSONUnmarshal(x.MinAvailable)
} else {
z.DecFallback(yyv9, false)
z.DecFallback(x.MinAvailable, false)
}
}
yyj8++
if yyhl8 {
yyb8 = yyj8 > l
yyj10++
if yyhl10 {
yyb10 = yyj10 > l
} else {
yyb8 = r.CheckBreak()
yyb10 = r.CheckBreak()
}
if yyb8 {
if yyb10 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
@@ -322,26 +395,55 @@ func (x *PodDisruptionBudgetSpec) codecDecodeSelfFromArray(l int, d *codec1978.D
if x.Selector == nil {
x.Selector = new(pkg2_v1.LabelSelector)
}
yym12 := z.DecBinary()
_ = yym12
yym14 := z.DecBinary()
_ = yym14
if false {
} else if z.HasExtensions() && z.DecExt(x.Selector) {
} else {
z.DecFallback(x.Selector, false)
}
}
for {
yyj8++
if yyhl8 {
yyb8 = yyj8 > l
} else {
yyb8 = r.CheckBreak()
yyj10++
if yyhl10 {
yyb10 = yyj10 > l
} else {
yyb10 = r.CheckBreak()
}
if yyb10 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
if x.MaxUnavailable != nil {
x.MaxUnavailable = nil
}
if yyb8 {
} else {
if x.MaxUnavailable == nil {
x.MaxUnavailable = new(pkg1_intstr.IntOrString)
}
yym16 := z.DecBinary()
_ = yym16
if false {
} else if z.HasExtensions() && z.DecExt(x.MaxUnavailable) {
} else if !yym16 && z.IsJSONHandle() {
z.DecJSONUnmarshal(x.MaxUnavailable)
} else {
z.DecFallback(x.MaxUnavailable, false)
}
}
for {
yyj10++
if yyhl10 {
yyb10 = yyj10 > l
} else {
yyb10 = r.CheckBreak()
}
if yyb10 {
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj8-1, "")
z.DecStructFieldNotFound(yyj10-1, "")
}
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}
@@ -2122,7 +2224,7 @@ func (x codecSelfer1234) decSlicePodDisruptionBudget(v *[]PodDisruptionBudget, d
yyrg1 := len(yyv1) > 0
yyv21 := yyv1
yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 336)
yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 320)
if yyrt1 {
if yyrl1 <= cap(yyv1) {
yyv1 = yyv1[:yyrl1]

View File

@@ -56,9 +56,10 @@ func (PodDisruptionBudgetList) SwaggerDoc() map[string]string {
}
var map_PodDisruptionBudgetSpec = map[string]string{
"": "PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.",
"minAvailable": "An eviction is allowed if at least \"minAvailable\" pods selected by \"selector\" will still be available after the eviction, i.e. even in the absence of the evicted pod. So for example you can prevent all voluntary evictions by specifying \"100%\".",
"selector": "Label query over pods whose evictions are managed by the disruption budget.",
"": "PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.",
"minAvailable": "An eviction is allowed if at least \"minAvailable\" pods selected by \"selector\" will still be available after the eviction, i.e. even in the absence of the evicted pod. So for example you can prevent all voluntary evictions by specifying \"100%\".",
"selector": "Label query over pods whose evictions are managed by the disruption budget.",
"maxUnavailable": "An eviction is allowed if at most \"maxUnavailable\" pods selected by \"selector\" are unavailable after the eviction, i.e. even in absence of the evicted pod. For example, one can prevent all voluntary evictions by specifying 0. This is a mutually exclusive setting with \"minAvailable\".",
}
func (PodDisruptionBudgetSpec) SwaggerDoc() map[string]string {

View File

@@ -24,6 +24,7 @@ import (
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime"
intstr "k8s.io/apimachinery/pkg/util/intstr"
policy "k8s.io/kubernetes/pkg/apis/policy"
unsafe "unsafe"
)
@@ -130,8 +131,9 @@ func Convert_policy_PodDisruptionBudgetList_To_v1beta1_PodDisruptionBudgetList(i
}
func autoConvert_v1beta1_PodDisruptionBudgetSpec_To_policy_PodDisruptionBudgetSpec(in *PodDisruptionBudgetSpec, out *policy.PodDisruptionBudgetSpec, s conversion.Scope) error {
out.MinAvailable = in.MinAvailable
out.MinAvailable = (*intstr.IntOrString)(unsafe.Pointer(in.MinAvailable))
out.Selector = (*v1.LabelSelector)(unsafe.Pointer(in.Selector))
out.MaxUnavailable = (*intstr.IntOrString)(unsafe.Pointer(in.MaxUnavailable))
return nil
}
@@ -141,8 +143,9 @@ func Convert_v1beta1_PodDisruptionBudgetSpec_To_policy_PodDisruptionBudgetSpec(i
}
func autoConvert_policy_PodDisruptionBudgetSpec_To_v1beta1_PodDisruptionBudgetSpec(in *policy.PodDisruptionBudgetSpec, out *PodDisruptionBudgetSpec, s conversion.Scope) error {
out.MinAvailable = in.MinAvailable
out.MinAvailable = (*intstr.IntOrString)(unsafe.Pointer(in.MinAvailable))
out.Selector = (*v1.LabelSelector)(unsafe.Pointer(in.Selector))
out.MaxUnavailable = (*intstr.IntOrString)(unsafe.Pointer(in.MaxUnavailable))
return nil
}

View File

@@ -24,6 +24,7 @@ import (
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime"
intstr "k8s.io/apimachinery/pkg/util/intstr"
reflect "reflect"
)
@@ -112,6 +113,11 @@ func DeepCopy_v1beta1_PodDisruptionBudgetSpec(in interface{}, out interface{}, c
in := in.(*PodDisruptionBudgetSpec)
out := out.(*PodDisruptionBudgetSpec)
*out = *in
if in.MinAvailable != nil {
in, out := &in.MinAvailable, &out.MinAvailable
*out = new(intstr.IntOrString)
**out = **in
}
if in.Selector != nil {
in, out := &in.Selector, &out.Selector
if newVal, err := c.DeepCopy(*in); err != nil {
@@ -120,6 +126,11 @@ func DeepCopy_v1beta1_PodDisruptionBudgetSpec(in interface{}, out interface{}, c
*out = newVal.(*v1.LabelSelector)
}
}
if in.MaxUnavailable != nil {
in, out := &in.MaxUnavailable, &out.MaxUnavailable
*out = new(intstr.IntOrString)
**out = **in
}
return nil
}
}

View File

@@ -24,6 +24,7 @@ import (
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime"
intstr "k8s.io/apimachinery/pkg/util/intstr"
reflect "reflect"
)
@@ -112,6 +113,11 @@ func DeepCopy_policy_PodDisruptionBudgetSpec(in interface{}, out interface{}, c
in := in.(*PodDisruptionBudgetSpec)
out := out.(*PodDisruptionBudgetSpec)
*out = *in
if in.MinAvailable != nil {
in, out := &in.MinAvailable, &out.MinAvailable
*out = new(intstr.IntOrString)
**out = **in
}
if in.Selector != nil {
in, out := &in.Selector, &out.Selector
if newVal, err := c.DeepCopy(*in); err != nil {
@@ -120,6 +126,11 @@ func DeepCopy_policy_PodDisruptionBudgetSpec(in interface{}, out interface{}, c
*out = newVal.(*v1.LabelSelector)
}
}
if in.MaxUnavailable != nil {
in, out := &in.MaxUnavailable, &out.MaxUnavailable
*out = new(intstr.IntOrString)
**out = **in
}
return nil
}
}