aboutsummaryrefslogtreecommitdiffstats
path: root/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy
diff options
context:
space:
mode:
authorHuabingZhao <zhao.huabing@zte.com.cn>2017-08-31 11:59:47 +0800
committerHuabingZhao <zhao.huabing@zte.com.cn>2017-08-31 12:00:09 +0800
commitc0f3b093c704da85252044b3a177dbabab63c49a (patch)
treef6cb5d85315c307bcf4984ac04e76e84b9abeac6 /kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy
parentc1737d2abac61511e00f388538779d67464b8a98 (diff)
add vendor package
Issue-Id: OOM-61 Change-Id: I251336e3b711b14f8ae9a8b0bf6055011a1d9bc8 Signed-off-by: HuabingZhao <zhao.huabing@zte.com.cn>
Diffstat (limited to 'kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy')
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy/deep_copy_generated.go90
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy/doc.go19
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy/install/install.go129
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy/register.go52
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy/types.generated.go1440
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy/types.go71
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/conversion_generated.go183
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/deep_copy_generated.go91
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/doc.go23
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/generated.pb.go903
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/generated.proto77
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/register.go50
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/types.generated.go1440
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/types.go72
-rw-r--r--kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/types_swagger_doc_generated.go70
15 files changed, 4710 insertions, 0 deletions
diff --git a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy/deep_copy_generated.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy/deep_copy_generated.go
new file mode 100644
index 0000000..098a0ee
--- /dev/null
+++ b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy/deep_copy_generated.go
@@ -0,0 +1,90 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package policy
+
+import (
+ api "k8s.io/kubernetes/pkg/api"
+ unversioned "k8s.io/kubernetes/pkg/api/unversioned"
+ conversion "k8s.io/kubernetes/pkg/conversion"
+)
+
+func init() {
+ if err := api.Scheme.AddGeneratedDeepCopyFuncs(
+ DeepCopy_policy_PodDisruptionBudget,
+ DeepCopy_policy_PodDisruptionBudgetList,
+ DeepCopy_policy_PodDisruptionBudgetSpec,
+ DeepCopy_policy_PodDisruptionBudgetStatus,
+ ); err != nil {
+ // if one of the deep copy functions is malformed, detect it immediately.
+ panic(err)
+ }
+}
+
+func DeepCopy_policy_PodDisruptionBudget(in PodDisruptionBudget, out *PodDisruptionBudget, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := api.DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_policy_PodDisruptionBudgetSpec(in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ out.Status = in.Status
+ return nil
+}
+
+func DeepCopy_policy_PodDisruptionBudgetList(in PodDisruptionBudgetList, out *PodDisruptionBudgetList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := in.Items, &out.Items
+ *out = make([]PodDisruptionBudget, len(in))
+ for i := range in {
+ if err := DeepCopy_policy_PodDisruptionBudget(in[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_policy_PodDisruptionBudgetSpec(in PodDisruptionBudgetSpec, out *PodDisruptionBudgetSpec, c *conversion.Cloner) error {
+ out.MinAvailable = in.MinAvailable
+ if in.Selector != nil {
+ in, out := in.Selector, &out.Selector
+ *out = new(unversioned.LabelSelector)
+ if err := unversioned.DeepCopy_unversioned_LabelSelector(*in, *out, c); err != nil {
+ return err
+ }
+ } else {
+ out.Selector = nil
+ }
+ return nil
+}
+
+func DeepCopy_policy_PodDisruptionBudgetStatus(in PodDisruptionBudgetStatus, out *PodDisruptionBudgetStatus, c *conversion.Cloner) error {
+ out.PodDisruptionAllowed = in.PodDisruptionAllowed
+ out.CurrentHealthy = in.CurrentHealthy
+ out.DesiredHealthy = in.DesiredHealthy
+ out.ExpectedPods = in.ExpectedPods
+ return nil
+}
diff --git a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy/doc.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy/doc.go
new file mode 100644
index 0000000..876858c
--- /dev/null
+++ b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy/doc.go
@@ -0,0 +1,19 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// +k8s:deepcopy-gen=package,register
+
+package policy
diff --git a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy/install/install.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy/install/install.go
new file mode 100644
index 0000000..90489a7
--- /dev/null
+++ b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy/install/install.go
@@ -0,0 +1,129 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package install installs the experimental API group, making it available as
+// an option to all of the API encoding/decoding machinery.
+package install
+
+import (
+ "fmt"
+
+ "github.com/golang/glog"
+
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/api/meta"
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/apimachinery"
+ "k8s.io/kubernetes/pkg/apimachinery/registered"
+ "k8s.io/kubernetes/pkg/apis/policy"
+ "k8s.io/kubernetes/pkg/apis/policy/v1alpha1"
+ "k8s.io/kubernetes/pkg/runtime"
+ "k8s.io/kubernetes/pkg/util/sets"
+)
+
+const importPrefix = "k8s.io/kubernetes/pkg/apis/policy"
+
+var accessor = meta.NewAccessor()
+
+// availableVersions lists all known external versions for this group from most preferred to least preferred
+var availableVersions = []unversioned.GroupVersion{v1alpha1.SchemeGroupVersion}
+
+func init() {
+ registered.RegisterVersions(availableVersions)
+ externalVersions := []unversioned.GroupVersion{}
+ for _, v := range availableVersions {
+ if registered.IsAllowedVersion(v) {
+ externalVersions = append(externalVersions, v)
+ }
+ }
+ if len(externalVersions) == 0 {
+ glog.V(4).Infof("No version is registered for group %v", policy.GroupName)
+ return
+ }
+
+ if err := registered.EnableVersions(externalVersions...); err != nil {
+ glog.V(4).Infof("%v", err)
+ return
+ }
+ if err := enableVersions(externalVersions); err != nil {
+ glog.V(4).Infof("%v", err)
+ return
+ }
+}
+
+// TODO: enableVersions should be centralized rather than spread in each API
+// group.
+// We can combine registered.RegisterVersions, registered.EnableVersions and
+// registered.RegisterGroup once we have moved enableVersions there.
+func enableVersions(externalVersions []unversioned.GroupVersion) error {
+ addVersionsToScheme(externalVersions...)
+ preferredExternalVersion := externalVersions[0]
+
+ groupMeta := apimachinery.GroupMeta{
+ GroupVersion: preferredExternalVersion,
+ GroupVersions: externalVersions,
+ RESTMapper: newRESTMapper(externalVersions),
+ SelfLinker: runtime.SelfLinker(accessor),
+ InterfacesFor: interfacesFor,
+ }
+
+ if err := registered.RegisterGroup(groupMeta); err != nil {
+ return err
+ }
+ api.RegisterRESTMapper(groupMeta.RESTMapper)
+ return nil
+}
+
+func newRESTMapper(externalVersions []unversioned.GroupVersion) meta.RESTMapper {
+ // the list of kinds that are scoped at the root of the api hierarchy
+ // if a kind is not enumerated here, it is assumed to have a namespace scope
+ rootScoped := sets.NewString()
+
+ ignoredKinds := sets.NewString()
+
+ return api.NewDefaultRESTMapper(externalVersions, interfacesFor, importPrefix, ignoredKinds, rootScoped)
+}
+
+// interfacesFor returns the default Codec and ResourceVersioner for a given version
+// string, or an error if the version is not known.
+func interfacesFor(version unversioned.GroupVersion) (*meta.VersionInterfaces, error) {
+ switch version {
+ case v1alpha1.SchemeGroupVersion:
+ return &meta.VersionInterfaces{
+ ObjectConvertor: api.Scheme,
+ MetadataAccessor: accessor,
+ }, nil
+ default:
+ g, _ := registered.Group(policy.GroupName)
+ return nil, fmt.Errorf("unsupported storage version: %s (valid: %v)", version, g.GroupVersions)
+ }
+}
+
+func addVersionsToScheme(externalVersions ...unversioned.GroupVersion) {
+ // add the internal version to Scheme
+ policy.AddToScheme(api.Scheme)
+ // add the enabled external versions to Scheme
+ for _, v := range externalVersions {
+ if !registered.IsEnabledVersion(v) {
+ glog.Errorf("Version %s is not enabled, so it will not be added to the Scheme.", v)
+ continue
+ }
+ switch v {
+ case v1alpha1.SchemeGroupVersion:
+ v1alpha1.AddToScheme(api.Scheme)
+ }
+ }
+}
diff --git a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy/register.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy/register.go
new file mode 100644
index 0000000..e61c82b
--- /dev/null
+++ b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy/register.go
@@ -0,0 +1,52 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package policy
+
+import (
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/runtime"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "policy"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
+
+// Kind takes an unqualified kind and returns back a Group qualified GroupKind
+func Kind(kind string) unversioned.GroupKind {
+ return SchemeGroupVersion.WithKind(kind).GroupKind()
+}
+
+// Resource takes an unqualified resource and returns back a Group qualified GroupResource
+func Resource(resource string) unversioned.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+func AddToScheme(scheme *runtime.Scheme) {
+ // Add the API to Scheme.
+ addKnownTypes(scheme)
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) {
+ // TODO this gets cleaned up when the types are fixed
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &PodDisruptionBudget{},
+ &PodDisruptionBudgetList{},
+ )
+}
diff --git a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy/types.generated.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy/types.generated.go
new file mode 100644
index 0000000..0665268
--- /dev/null
+++ b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy/types.generated.go
@@ -0,0 +1,1440 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// ************************************************************
+// DO NOT EDIT.
+// THIS FILE IS AUTO-GENERATED BY codecgen.
+// ************************************************************
+
+package policy
+
+import (
+ "errors"
+ "fmt"
+ codec1978 "github.com/ugorji/go/codec"
+ pkg3_api "k8s.io/kubernetes/pkg/api"
+ pkg2_unversioned "k8s.io/kubernetes/pkg/api/unversioned"
+ pkg4_types "k8s.io/kubernetes/pkg/types"
+ pkg1_intstr "k8s.io/kubernetes/pkg/util/intstr"
+ "reflect"
+ "runtime"
+ time "time"
+)
+
+const (
+ // ----- content types ----
+ codecSelferC_UTF81234 = 1
+ codecSelferC_RAW1234 = 0
+ // ----- value types used ----
+ codecSelferValueTypeArray1234 = 10
+ codecSelferValueTypeMap1234 = 9
+ // ----- containerStateValues ----
+ codecSelfer_containerMapKey1234 = 2
+ codecSelfer_containerMapValue1234 = 3
+ codecSelfer_containerMapEnd1234 = 4
+ codecSelfer_containerArrayElem1234 = 6
+ codecSelfer_containerArrayEnd1234 = 7
+)
+
+var (
+ codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits())
+ codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`)
+)
+
+type codecSelfer1234 struct{}
+
+func init() {
+ if codec1978.GenVersion != 5 {
+ _, file, _, _ := runtime.Caller(0)
+ err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v",
+ 5, codec1978.GenVersion, file)
+ panic(err)
+ }
+ if false { // reference the types, but skip this branch at build/run time
+ var v0 pkg3_api.ObjectMeta
+ var v1 pkg2_unversioned.LabelSelector
+ var v2 pkg4_types.UID
+ var v3 pkg1_intstr.IntOrString
+ var v4 time.Time
+ _, _, _, _, _ = v0, v1, v2, v3, v4
+ }
+}
+
+func (x *PodDisruptionBudgetSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ if x == nil {
+ r.EncodeNil()
+ } else {
+ yym1 := z.EncBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x) {
+ } else {
+ yysep2 := !z.EncBinary()
+ yy2arr2 := z.EncBasicHandle().StructToArray
+ var yyq2 [2]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = true
+ yyq2[1] = x.Selector != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(2)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ 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)
+ } else {
+ z.EncFallback(yy4)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ 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)
+ } else {
+ z.EncFallback(yy6)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Selector == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.Selector) {
+ } else {
+ z.EncFallback(x.Selector)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("selector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Selector == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.Selector) {
+ } else {
+ z.EncFallback(x.Selector)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodDisruptionBudgetSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ yym1 := z.DecBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x) {
+ } else {
+ yyct2 := r.ContainerType()
+ if yyct2 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodDisruptionBudgetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yys3Slc = z.DecScratchBuffer() // default slice to decode into
+ _ = yys3Slc
+ var yyhl3 bool = l >= 0
+ for yyj3 := 0; ; yyj3++ {
+ if yyhl3 {
+ if yyj3 >= l {
+ break
+ }
+ } else {
+ if r.CheckBreak() {
+ break
+ }
+ }
+ z.DecSendContainerState(codecSelfer_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "minAvailable":
+ if r.TryDecodeAsNil() {
+ x.MinAvailable = pkg1_intstr.IntOrString{}
+ } else {
+ yyv4 := &x.MinAvailable
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else if !yym5 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv4)
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "selector":
+ if r.TryDecodeAsNil() {
+ if x.Selector != nil {
+ x.Selector = nil
+ }
+ } else {
+ if x.Selector == nil {
+ x.Selector = new(pkg2_unversioned.LabelSelector)
+ }
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.Selector) {
+ } else {
+ z.DecFallback(x.Selector, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodDisruptionBudgetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ 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
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.MinAvailable = pkg1_intstr.IntOrString{}
+ } else {
+ yyv9 := &x.MinAvailable
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv9) {
+ } else if !yym10 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv9)
+ } else {
+ z.DecFallback(yyv9, false)
+ }
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Selector != nil {
+ x.Selector = nil
+ }
+ } else {
+ if x.Selector == nil {
+ x.Selector = new(pkg2_unversioned.LabelSelector)
+ }
+ yym12 := z.DecBinary()
+ _ = yym12
+ 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()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PodDisruptionBudgetStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ if x == nil {
+ r.EncodeNil()
+ } else {
+ yym1 := z.EncBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x) {
+ } else {
+ yysep2 := !z.EncBinary()
+ yy2arr2 := z.EncBasicHandle().StructToArray
+ var yyq2 [4]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 4
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeBool(bool(x.PodDisruptionAllowed))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("disruptionAllowed"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeBool(bool(x.PodDisruptionAllowed))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeInt(int64(x.CurrentHealthy))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("currentHealthy"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeInt(int64(x.CurrentHealthy))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeInt(int64(x.DesiredHealthy))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("desiredHealthy"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeInt(int64(x.DesiredHealthy))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ExpectedPods))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("expectedPods"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ExpectedPods))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodDisruptionBudgetStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ yym1 := z.DecBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x) {
+ } else {
+ yyct2 := r.ContainerType()
+ if yyct2 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodDisruptionBudgetStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yys3Slc = z.DecScratchBuffer() // default slice to decode into
+ _ = yys3Slc
+ var yyhl3 bool = l >= 0
+ for yyj3 := 0; ; yyj3++ {
+ if yyhl3 {
+ if yyj3 >= l {
+ break
+ }
+ } else {
+ if r.CheckBreak() {
+ break
+ }
+ }
+ z.DecSendContainerState(codecSelfer_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "disruptionAllowed":
+ if r.TryDecodeAsNil() {
+ x.PodDisruptionAllowed = false
+ } else {
+ x.PodDisruptionAllowed = bool(r.DecodeBool())
+ }
+ case "currentHealthy":
+ if r.TryDecodeAsNil() {
+ x.CurrentHealthy = 0
+ } else {
+ x.CurrentHealthy = int32(r.DecodeInt(32))
+ }
+ case "desiredHealthy":
+ if r.TryDecodeAsNil() {
+ x.DesiredHealthy = 0
+ } else {
+ x.DesiredHealthy = int32(r.DecodeInt(32))
+ }
+ case "expectedPods":
+ if r.TryDecodeAsNil() {
+ x.ExpectedPods = 0
+ } else {
+ x.ExpectedPods = int32(r.DecodeInt(32))
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodDisruptionBudgetStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ 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
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.PodDisruptionAllowed = false
+ } else {
+ x.PodDisruptionAllowed = bool(r.DecodeBool())
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.CurrentHealthy = 0
+ } else {
+ x.CurrentHealthy = int32(r.DecodeInt(32))
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.DesiredHealthy = 0
+ } else {
+ x.DesiredHealthy = int32(r.DecodeInt(32))
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ExpectedPods = 0
+ } else {
+ x.ExpectedPods = int32(r.DecodeInt(32))
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PodDisruptionBudget) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ if x == nil {
+ r.EncodeNil()
+ } else {
+ yym1 := z.EncBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x) {
+ } else {
+ yysep2 := !z.EncBinary()
+ yy2arr2 := z.EncBasicHandle().StructToArray
+ var yyq2 [5]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = true
+ yyq2[1] = true
+ yyq2[2] = true
+ yyq2[3] = x.Kind != ""
+ yyq2[4] = x.APIVersion != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yy9 := &x.Spec
+ yy9.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy11 := &x.Spec
+ yy11.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yy14 := &x.Status
+ yy14.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy16 := &x.Status
+ yy16.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodDisruptionBudget) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ yym1 := z.DecBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x) {
+ } else {
+ yyct2 := r.ContainerType()
+ if yyct2 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodDisruptionBudget) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yys3Slc = z.DecScratchBuffer() // default slice to decode into
+ _ = yys3Slc
+ var yyhl3 bool = l >= 0
+ for yyj3 := 0; ; yyj3++ {
+ if yyhl3 {
+ if yyj3 >= l {
+ break
+ }
+ } else {
+ if r.CheckBreak() {
+ break
+ }
+ }
+ z.DecSendContainerState(codecSelfer_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg3_api.ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = PodDisruptionBudgetSpec{}
+ } else {
+ yyv5 := &x.Spec
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = PodDisruptionBudgetStatus{}
+ } else {
+ yyv6 := &x.Status
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodDisruptionBudget) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj9 int
+ var yyb9 bool
+ var yyhl9 bool = l >= 0
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg3_api.ObjectMeta{}
+ } else {
+ yyv10 := &x.ObjectMeta
+ yyv10.CodecDecodeSelf(d)
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = PodDisruptionBudgetSpec{}
+ } else {
+ yyv11 := &x.Spec
+ yyv11.CodecDecodeSelf(d)
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = PodDisruptionBudgetStatus{}
+ } else {
+ yyv12 := &x.Status
+ yyv12.CodecDecodeSelf(d)
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ for {
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj9-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PodDisruptionBudgetList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ if x == nil {
+ r.EncodeNil()
+ } else {
+ yym1 := z.EncBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x) {
+ } else {
+ yysep2 := !z.EncBinary()
+ yy2arr2 := z.EncBasicHandle().StructToArray
+ var yyq2 [4]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yy4 := &x.ListMeta
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy4) {
+ } else {
+ z.EncFallback(yy4)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ListMeta
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy6) {
+ } else {
+ z.EncFallback(yy6)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else {
+ h.encSlicePodDisruptionBudget(([]PodDisruptionBudget)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSlicePodDisruptionBudget(([]PodDisruptionBudget)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodDisruptionBudgetList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ yym1 := z.DecBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x) {
+ } else {
+ yyct2 := r.ContainerType()
+ if yyct2 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodDisruptionBudgetList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yys3Slc = z.DecScratchBuffer() // default slice to decode into
+ _ = yys3Slc
+ var yyhl3 bool = l >= 0
+ for yyj3 := 0; ; yyj3++ {
+ if yyhl3 {
+ if yyj3 >= l {
+ break
+ }
+ } else {
+ if r.CheckBreak() {
+ break
+ }
+ }
+ z.DecSendContainerState(codecSelfer_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSlicePodDisruptionBudget((*[]PodDisruptionBudget)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodDisruptionBudgetList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj10 int
+ var yyb10 bool
+ var yyhl10 bool = l >= 0
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, false)
+ }
+ }
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSlicePodDisruptionBudget((*[]PodDisruptionBudget)(yyv13), d)
+ }
+ }
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ for {
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) encSlicePodDisruptionBudget(v []PodDisruptionBudget, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSlicePodDisruptionBudget(v *[]PodDisruptionBudget, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+
+ yyv1 := *v
+ yyh1, yyl1 := z.DecSliceHelperStart()
+ var yyc1 bool
+ _ = yyc1
+ if yyl1 == 0 {
+ if yyv1 == nil {
+ yyv1 = []PodDisruptionBudget{}
+ yyc1 = true
+ } else if len(yyv1) != 0 {
+ yyv1 = yyv1[:0]
+ yyc1 = true
+ }
+ } else if yyl1 > 0 {
+ var yyrr1, yyrl1 int
+ var yyrt1 bool
+ _, _ = yyrl1, yyrt1
+ yyrr1 = yyl1 // len(yyv1)
+ if yyl1 > cap(yyv1) {
+
+ yyrg1 := len(yyv1) > 0
+ yyv21 := yyv1
+ yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 296)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]PodDisruptionBudget, yyrl1)
+ }
+ } else {
+ yyv1 = make([]PodDisruptionBudget, yyrl1)
+ }
+ yyc1 = true
+ yyrr1 = len(yyv1)
+ if yyrg1 {
+ copy(yyv1, yyv21)
+ }
+ } else if yyl1 != len(yyv1) {
+ yyv1 = yyv1[:yyl1]
+ yyc1 = true
+ }
+ yyj1 := 0
+ for ; yyj1 < yyrr1; yyj1++ {
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = PodDisruptionBudget{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, PodDisruptionBudget{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = PodDisruptionBudget{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, PodDisruptionBudget{}) // var yyz1 PodDisruptionBudget
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = PodDisruptionBudget{}
+ } else {
+ yyv4 := &yyv1[yyj1]
+ yyv4.CodecDecodeSelf(d)
+ }
+
+ } else {
+ z.DecSwallow()
+ }
+
+ }
+ if yyj1 < len(yyv1) {
+ yyv1 = yyv1[:yyj1]
+ yyc1 = true
+ } else if yyj1 == 0 && yyv1 == nil {
+ yyv1 = []PodDisruptionBudget{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
diff --git a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy/types.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy/types.go
new file mode 100644
index 0000000..adc31e5
--- /dev/null
+++ b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy/types.go
@@ -0,0 +1,71 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package policy
+
+import (
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/util/intstr"
+)
+
+// PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.
+type PodDisruptionBudgetSpec struct {
+ // The minimum number of pods that must be available simultaneously. This
+ // can be either an integer or a string specifying a percentage, e.g. "28%".
+ MinAvailable intstr.IntOrString `json:"minAvailable,omitempty"`
+
+ // Label query over pods whose evictions are managed by the disruption
+ // budget.
+ Selector *unversioned.LabelSelector `json:"selector,omitempty"`
+}
+
+// PodDisruptionBudgetStatus represents information about the status of a
+// PodDisruptionBudget. Status may trail the actual state of a system.
+type PodDisruptionBudgetStatus struct {
+ // Whether or not a disruption is currently allowed.
+ PodDisruptionAllowed bool `json:"disruptionAllowed"`
+
+ // current number of healthy pods
+ CurrentHealthy int32 `json:"currentHealthy"`
+
+ // minimum desired number of healthy pods
+ DesiredHealthy int32 `json:"desiredHealthy"`
+
+ // total number of pods counted by this disruption budget
+ ExpectedPods int32 `json:"expectedPods"`
+}
+
+// +genclient=true
+// +noMethods=true
+
+// PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods
+type PodDisruptionBudget struct {
+ unversioned.TypeMeta `json:",inline"`
+ api.ObjectMeta `json:"metadata,omitempty"`
+
+ // Specification of the desired behavior of the PodDisruptionBudget.
+ Spec PodDisruptionBudgetSpec `json:"spec,omitempty"`
+ // Most recently observed status of the PodDisruptionBudget.
+ Status PodDisruptionBudgetStatus `json:"status,omitempty"`
+}
+
+// PodDisruptionBudgetList is a collection of PodDisruptionBudgets.
+type PodDisruptionBudgetList struct {
+ unversioned.TypeMeta `json:",inline"`
+ unversioned.ListMeta `json:"metadata,omitempty"`
+ Items []PodDisruptionBudget `json:"items"`
+}
diff --git a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/conversion_generated.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/conversion_generated.go
new file mode 100644
index 0000000..c524ca2
--- /dev/null
+++ b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/conversion_generated.go
@@ -0,0 +1,183 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by conversion-gen. Do not edit it manually!
+
+package v1alpha1
+
+import (
+ api "k8s.io/kubernetes/pkg/api"
+ policy "k8s.io/kubernetes/pkg/apis/policy"
+ conversion "k8s.io/kubernetes/pkg/conversion"
+)
+
+func init() {
+ if err := api.Scheme.AddGeneratedConversionFuncs(
+ Convert_v1alpha1_PodDisruptionBudget_To_policy_PodDisruptionBudget,
+ Convert_policy_PodDisruptionBudget_To_v1alpha1_PodDisruptionBudget,
+ Convert_v1alpha1_PodDisruptionBudgetList_To_policy_PodDisruptionBudgetList,
+ Convert_policy_PodDisruptionBudgetList_To_v1alpha1_PodDisruptionBudgetList,
+ Convert_v1alpha1_PodDisruptionBudgetSpec_To_policy_PodDisruptionBudgetSpec,
+ Convert_policy_PodDisruptionBudgetSpec_To_v1alpha1_PodDisruptionBudgetSpec,
+ Convert_v1alpha1_PodDisruptionBudgetStatus_To_policy_PodDisruptionBudgetStatus,
+ Convert_policy_PodDisruptionBudgetStatus_To_v1alpha1_PodDisruptionBudgetStatus,
+ ); err != nil {
+ // if one of the conversion functions is malformed, detect it immediately.
+ panic(err)
+ }
+}
+
+func autoConvert_v1alpha1_PodDisruptionBudget_To_policy_PodDisruptionBudget(in *PodDisruptionBudget, out *policy.PodDisruptionBudget, s conversion.Scope) error {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
+ return err
+ }
+ if err := Convert_v1alpha1_PodDisruptionBudgetSpec_To_policy_PodDisruptionBudgetSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1alpha1_PodDisruptionBudgetStatus_To_policy_PodDisruptionBudgetStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func Convert_v1alpha1_PodDisruptionBudget_To_policy_PodDisruptionBudget(in *PodDisruptionBudget, out *policy.PodDisruptionBudget, s conversion.Scope) error {
+ return autoConvert_v1alpha1_PodDisruptionBudget_To_policy_PodDisruptionBudget(in, out, s)
+}
+
+func autoConvert_policy_PodDisruptionBudget_To_v1alpha1_PodDisruptionBudget(in *policy.PodDisruptionBudget, out *PodDisruptionBudget, s conversion.Scope) error {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
+ return err
+ }
+ if err := Convert_policy_PodDisruptionBudgetSpec_To_v1alpha1_PodDisruptionBudgetSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_policy_PodDisruptionBudgetStatus_To_v1alpha1_PodDisruptionBudgetStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func Convert_policy_PodDisruptionBudget_To_v1alpha1_PodDisruptionBudget(in *policy.PodDisruptionBudget, out *PodDisruptionBudget, s conversion.Scope) error {
+ return autoConvert_policy_PodDisruptionBudget_To_v1alpha1_PodDisruptionBudget(in, out, s)
+}
+
+func autoConvert_v1alpha1_PodDisruptionBudgetList_To_policy_PodDisruptionBudgetList(in *PodDisruptionBudgetList, out *policy.PodDisruptionBudgetList, s conversion.Scope) error {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]policy.PodDisruptionBudget, len(*in))
+ for i := range *in {
+ if err := Convert_v1alpha1_PodDisruptionBudget_To_policy_PodDisruptionBudget(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func Convert_v1alpha1_PodDisruptionBudgetList_To_policy_PodDisruptionBudgetList(in *PodDisruptionBudgetList, out *policy.PodDisruptionBudgetList, s conversion.Scope) error {
+ return autoConvert_v1alpha1_PodDisruptionBudgetList_To_policy_PodDisruptionBudgetList(in, out, s)
+}
+
+func autoConvert_policy_PodDisruptionBudgetList_To_v1alpha1_PodDisruptionBudgetList(in *policy.PodDisruptionBudgetList, out *PodDisruptionBudgetList, s conversion.Scope) error {
+ if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
+ return err
+ }
+ if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
+ return err
+ }
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]PodDisruptionBudget, len(*in))
+ for i := range *in {
+ if err := Convert_policy_PodDisruptionBudget_To_v1alpha1_PodDisruptionBudget(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func Convert_policy_PodDisruptionBudgetList_To_v1alpha1_PodDisruptionBudgetList(in *policy.PodDisruptionBudgetList, out *PodDisruptionBudgetList, s conversion.Scope) error {
+ return autoConvert_policy_PodDisruptionBudgetList_To_v1alpha1_PodDisruptionBudgetList(in, out, s)
+}
+
+func autoConvert_v1alpha1_PodDisruptionBudgetSpec_To_policy_PodDisruptionBudgetSpec(in *PodDisruptionBudgetSpec, out *policy.PodDisruptionBudgetSpec, s conversion.Scope) error {
+ if err := api.Convert_intstr_IntOrString_To_intstr_IntOrString(&in.MinAvailable, &out.MinAvailable, s); err != nil {
+ return err
+ }
+ out.Selector = in.Selector
+ return nil
+}
+
+func Convert_v1alpha1_PodDisruptionBudgetSpec_To_policy_PodDisruptionBudgetSpec(in *PodDisruptionBudgetSpec, out *policy.PodDisruptionBudgetSpec, s conversion.Scope) error {
+ return autoConvert_v1alpha1_PodDisruptionBudgetSpec_To_policy_PodDisruptionBudgetSpec(in, out, s)
+}
+
+func autoConvert_policy_PodDisruptionBudgetSpec_To_v1alpha1_PodDisruptionBudgetSpec(in *policy.PodDisruptionBudgetSpec, out *PodDisruptionBudgetSpec, s conversion.Scope) error {
+ if err := api.Convert_intstr_IntOrString_To_intstr_IntOrString(&in.MinAvailable, &out.MinAvailable, s); err != nil {
+ return err
+ }
+ out.Selector = in.Selector
+ return nil
+}
+
+func Convert_policy_PodDisruptionBudgetSpec_To_v1alpha1_PodDisruptionBudgetSpec(in *policy.PodDisruptionBudgetSpec, out *PodDisruptionBudgetSpec, s conversion.Scope) error {
+ return autoConvert_policy_PodDisruptionBudgetSpec_To_v1alpha1_PodDisruptionBudgetSpec(in, out, s)
+}
+
+func autoConvert_v1alpha1_PodDisruptionBudgetStatus_To_policy_PodDisruptionBudgetStatus(in *PodDisruptionBudgetStatus, out *policy.PodDisruptionBudgetStatus, s conversion.Scope) error {
+ out.PodDisruptionAllowed = in.PodDisruptionAllowed
+ out.CurrentHealthy = in.CurrentHealthy
+ out.DesiredHealthy = in.DesiredHealthy
+ out.ExpectedPods = in.ExpectedPods
+ return nil
+}
+
+func Convert_v1alpha1_PodDisruptionBudgetStatus_To_policy_PodDisruptionBudgetStatus(in *PodDisruptionBudgetStatus, out *policy.PodDisruptionBudgetStatus, s conversion.Scope) error {
+ return autoConvert_v1alpha1_PodDisruptionBudgetStatus_To_policy_PodDisruptionBudgetStatus(in, out, s)
+}
+
+func autoConvert_policy_PodDisruptionBudgetStatus_To_v1alpha1_PodDisruptionBudgetStatus(in *policy.PodDisruptionBudgetStatus, out *PodDisruptionBudgetStatus, s conversion.Scope) error {
+ out.PodDisruptionAllowed = in.PodDisruptionAllowed
+ out.CurrentHealthy = in.CurrentHealthy
+ out.DesiredHealthy = in.DesiredHealthy
+ out.ExpectedPods = in.ExpectedPods
+ return nil
+}
+
+func Convert_policy_PodDisruptionBudgetStatus_To_v1alpha1_PodDisruptionBudgetStatus(in *policy.PodDisruptionBudgetStatus, out *PodDisruptionBudgetStatus, s conversion.Scope) error {
+ return autoConvert_policy_PodDisruptionBudgetStatus_To_v1alpha1_PodDisruptionBudgetStatus(in, out, s)
+}
diff --git a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/deep_copy_generated.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/deep_copy_generated.go
new file mode 100644
index 0000000..05f286d
--- /dev/null
+++ b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/deep_copy_generated.go
@@ -0,0 +1,91 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package v1alpha1
+
+import (
+ api "k8s.io/kubernetes/pkg/api"
+ unversioned "k8s.io/kubernetes/pkg/api/unversioned"
+ v1 "k8s.io/kubernetes/pkg/api/v1"
+ conversion "k8s.io/kubernetes/pkg/conversion"
+)
+
+func init() {
+ if err := api.Scheme.AddGeneratedDeepCopyFuncs(
+ DeepCopy_v1alpha1_PodDisruptionBudget,
+ DeepCopy_v1alpha1_PodDisruptionBudgetList,
+ DeepCopy_v1alpha1_PodDisruptionBudgetSpec,
+ DeepCopy_v1alpha1_PodDisruptionBudgetStatus,
+ ); err != nil {
+ // if one of the deep copy functions is malformed, detect it immediately.
+ panic(err)
+ }
+}
+
+func DeepCopy_v1alpha1_PodDisruptionBudget(in PodDisruptionBudget, out *PodDisruptionBudget, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ if err := v1.DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1alpha1_PodDisruptionBudgetSpec(in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ out.Status = in.Status
+ return nil
+}
+
+func DeepCopy_v1alpha1_PodDisruptionBudgetList(in PodDisruptionBudgetList, out *PodDisruptionBudgetList, c *conversion.Cloner) error {
+ out.TypeMeta = in.TypeMeta
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := in.Items, &out.Items
+ *out = make([]PodDisruptionBudget, len(in))
+ for i := range in {
+ if err := DeepCopy_v1alpha1_PodDisruptionBudget(in[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1alpha1_PodDisruptionBudgetSpec(in PodDisruptionBudgetSpec, out *PodDisruptionBudgetSpec, c *conversion.Cloner) error {
+ out.MinAvailable = in.MinAvailable
+ if in.Selector != nil {
+ in, out := in.Selector, &out.Selector
+ *out = new(unversioned.LabelSelector)
+ if err := unversioned.DeepCopy_unversioned_LabelSelector(*in, *out, c); err != nil {
+ return err
+ }
+ } else {
+ out.Selector = nil
+ }
+ return nil
+}
+
+func DeepCopy_v1alpha1_PodDisruptionBudgetStatus(in PodDisruptionBudgetStatus, out *PodDisruptionBudgetStatus, c *conversion.Cloner) error {
+ out.PodDisruptionAllowed = in.PodDisruptionAllowed
+ out.CurrentHealthy = in.CurrentHealthy
+ out.DesiredHealthy = in.DesiredHealthy
+ out.ExpectedPods = in.ExpectedPods
+ return nil
+}
diff --git a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/doc.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/doc.go
new file mode 100644
index 0000000..985d4bb
--- /dev/null
+++ b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/doc.go
@@ -0,0 +1,23 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// +k8s:deepcopy-gen=package,register
+// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/policy
+
+// Package policy is for any kind of policy object. Suitable examples, even if
+// they aren't all here, are PodDisruptionBudget, PodSecurityPolicy,
+// NetworkPolicy, etc.
+package v1alpha1
diff --git a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/generated.pb.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/generated.pb.go
new file mode 100644
index 0000000..7a4c999
--- /dev/null
+++ b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/generated.pb.go
@@ -0,0 +1,903 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by protoc-gen-gogo.
+// source: k8s.io/kubernetes/pkg/apis/policy/v1alpha1/generated.proto
+// DO NOT EDIT!
+
+/*
+ Package v1alpha1 is a generated protocol buffer package.
+
+ It is generated from these files:
+ k8s.io/kubernetes/pkg/apis/policy/v1alpha1/generated.proto
+
+ It has these top-level messages:
+ PodDisruptionBudget
+ PodDisruptionBudgetList
+ PodDisruptionBudgetSpec
+ PodDisruptionBudgetStatus
+*/
+package v1alpha1
+
+import proto "github.com/gogo/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+import k8s_io_kubernetes_pkg_api_unversioned "k8s.io/kubernetes/pkg/api/unversioned"
+
+import io "io"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+func (m *PodDisruptionBudget) Reset() { *m = PodDisruptionBudget{} }
+func (m *PodDisruptionBudget) String() string { return proto.CompactTextString(m) }
+func (*PodDisruptionBudget) ProtoMessage() {}
+
+func (m *PodDisruptionBudgetList) Reset() { *m = PodDisruptionBudgetList{} }
+func (m *PodDisruptionBudgetList) String() string { return proto.CompactTextString(m) }
+func (*PodDisruptionBudgetList) ProtoMessage() {}
+
+func (m *PodDisruptionBudgetSpec) Reset() { *m = PodDisruptionBudgetSpec{} }
+func (m *PodDisruptionBudgetSpec) String() string { return proto.CompactTextString(m) }
+func (*PodDisruptionBudgetSpec) ProtoMessage() {}
+
+func (m *PodDisruptionBudgetStatus) Reset() { *m = PodDisruptionBudgetStatus{} }
+func (m *PodDisruptionBudgetStatus) String() string { return proto.CompactTextString(m) }
+func (*PodDisruptionBudgetStatus) ProtoMessage() {}
+
+func init() {
+ proto.RegisterType((*PodDisruptionBudget)(nil), "k8s.io.kubernetes.pkg.apis.policy.v1alpha1.PodDisruptionBudget")
+ proto.RegisterType((*PodDisruptionBudgetList)(nil), "k8s.io.kubernetes.pkg.apis.policy.v1alpha1.PodDisruptionBudgetList")
+ proto.RegisterType((*PodDisruptionBudgetSpec)(nil), "k8s.io.kubernetes.pkg.apis.policy.v1alpha1.PodDisruptionBudgetSpec")
+ proto.RegisterType((*PodDisruptionBudgetStatus)(nil), "k8s.io.kubernetes.pkg.apis.policy.v1alpha1.PodDisruptionBudgetStatus")
+}
+func (m *PodDisruptionBudget) Marshal() (data []byte, err error) {
+ size := m.Size()
+ data = make([]byte, size)
+ n, err := m.MarshalTo(data)
+ if err != nil {
+ return nil, err
+ }
+ return data[:n], nil
+}
+
+func (m *PodDisruptionBudget) MarshalTo(data []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ data[i] = 0xa
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size()))
+ n1, err := m.ObjectMeta.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n1
+ data[i] = 0x12
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.Spec.Size()))
+ n2, err := m.Spec.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n2
+ data[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.Status.Size()))
+ n3, err := m.Status.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n3
+ return i, nil
+}
+
+func (m *PodDisruptionBudgetList) Marshal() (data []byte, err error) {
+ size := m.Size()
+ data = make([]byte, size)
+ n, err := m.MarshalTo(data)
+ if err != nil {
+ return nil, err
+ }
+ return data[:n], nil
+}
+
+func (m *PodDisruptionBudgetList) MarshalTo(data []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ data[i] = 0xa
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size()))
+ n4, err := m.ListMeta.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n4
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ data[i] = 0x12
+ i++
+ i = encodeVarintGenerated(data, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *PodDisruptionBudgetSpec) Marshal() (data []byte, err error) {
+ size := m.Size()
+ data = make([]byte, size)
+ n, err := m.MarshalTo(data)
+ if err != nil {
+ return nil, err
+ }
+ return data[:n], nil
+}
+
+func (m *PodDisruptionBudgetSpec) MarshalTo(data []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ data[i] = 0xa
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.MinAvailable.Size()))
+ n5, err := m.MinAvailable.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n5
+ if m.Selector != nil {
+ data[i] = 0x12
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.Selector.Size()))
+ n6, err := m.Selector.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n6
+ }
+ return i, nil
+}
+
+func (m *PodDisruptionBudgetStatus) Marshal() (data []byte, err error) {
+ size := m.Size()
+ data = make([]byte, size)
+ n, err := m.MarshalTo(data)
+ if err != nil {
+ return nil, err
+ }
+ return data[:n], nil
+}
+
+func (m *PodDisruptionBudgetStatus) MarshalTo(data []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ data[i] = 0x8
+ i++
+ if m.PodDisruptionAllowed {
+ data[i] = 1
+ } else {
+ data[i] = 0
+ }
+ i++
+ data[i] = 0x10
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.CurrentHealthy))
+ data[i] = 0x18
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.DesiredHealthy))
+ data[i] = 0x20
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.ExpectedPods))
+ return i, nil
+}
+
+func encodeFixed64Generated(data []byte, offset int, v uint64) int {
+ data[offset] = uint8(v)
+ data[offset+1] = uint8(v >> 8)
+ data[offset+2] = uint8(v >> 16)
+ data[offset+3] = uint8(v >> 24)
+ data[offset+4] = uint8(v >> 32)
+ data[offset+5] = uint8(v >> 40)
+ data[offset+6] = uint8(v >> 48)
+ data[offset+7] = uint8(v >> 56)
+ return offset + 8
+}
+func encodeFixed32Generated(data []byte, offset int, v uint32) int {
+ data[offset] = uint8(v)
+ data[offset+1] = uint8(v >> 8)
+ data[offset+2] = uint8(v >> 16)
+ data[offset+3] = uint8(v >> 24)
+ return offset + 4
+}
+func encodeVarintGenerated(data []byte, offset int, v uint64) int {
+ for v >= 1<<7 {
+ data[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ data[offset] = uint8(v)
+ return offset + 1
+}
+func (m *PodDisruptionBudget) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *PodDisruptionBudgetList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *PodDisruptionBudgetSpec) Size() (n int) {
+ var l int
+ _ = l
+ l = m.MinAvailable.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.Selector != nil {
+ l = m.Selector.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *PodDisruptionBudgetStatus) Size() (n int) {
+ var l int
+ _ = l
+ n += 2
+ n += 1 + sovGenerated(uint64(m.CurrentHealthy))
+ n += 1 + sovGenerated(uint64(m.DesiredHealthy))
+ n += 1 + sovGenerated(uint64(m.ExpectedPods))
+ return n
+}
+
+func sovGenerated(x uint64) (n int) {
+ for {
+ n++
+ x >>= 7
+ if x == 0 {
+ break
+ }
+ }
+ return n
+}
+func sozGenerated(x uint64) (n int) {
+ return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+func (m *PodDisruptionBudget) Unmarshal(data []byte) error {
+ l := len(data)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodDisruptionBudget: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodDisruptionBudget: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", 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 err := m.ObjectMeta.Unmarshal(data[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", 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 err := m.Spec.Unmarshal(data[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", 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 err := m.Status.Unmarshal(data[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(data[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodDisruptionBudgetList) Unmarshal(data []byte) error {
+ l := len(data)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodDisruptionBudgetList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodDisruptionBudgetList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", 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 err := m.ListMeta.Unmarshal(data[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", 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
+ }
+ m.Items = append(m.Items, PodDisruptionBudget{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(data[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodDisruptionBudgetSpec) Unmarshal(data []byte) error {
+ l := len(data)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodDisruptionBudgetSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodDisruptionBudgetSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MinAvailable", 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 err := m.MinAvailable.Unmarshal(data[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Selector", 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.Selector == nil {
+ m.Selector = &k8s_io_kubernetes_pkg_api_unversioned.LabelSelector{}
+ }
+ if err := m.Selector.Unmarshal(data[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(data[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodDisruptionBudgetStatus) Unmarshal(data []byte) error {
+ l := len(data)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodDisruptionBudgetStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodDisruptionBudgetStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PodDisruptionAllowed", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.PodDisruptionAllowed = bool(v != 0)
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CurrentHealthy", wireType)
+ }
+ m.CurrentHealthy = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ m.CurrentHealthy |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DesiredHealthy", wireType)
+ }
+ m.DesiredHealthy = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ m.DesiredHealthy |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ExpectedPods", wireType)
+ }
+ m.ExpectedPods = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ m.ExpectedPods |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(data[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func skipGenerated(data []byte) (n int, err error) {
+ l := len(data)
+ iNdEx := 0
+ for iNdEx < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ wireType := int(wire & 0x7)
+ switch wireType {
+ case 0:
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ iNdEx++
+ if data[iNdEx-1] < 0x80 {
+ break
+ }
+ }
+ return iNdEx, nil
+ case 1:
+ iNdEx += 8
+ return iNdEx, nil
+ case 2:
+ var length int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ length |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ iNdEx += length
+ if length < 0 {
+ return 0, ErrInvalidLengthGenerated
+ }
+ return iNdEx, nil
+ case 3:
+ for {
+ var innerWire uint64
+ var start int = iNdEx
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ innerWire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ innerWireType := int(innerWire & 0x7)
+ if innerWireType == 4 {
+ break
+ }
+ next, err := skipGenerated(data[start:])
+ if err != nil {
+ return 0, err
+ }
+ iNdEx = start + next
+ }
+ return iNdEx, nil
+ case 4:
+ return iNdEx, nil
+ case 5:
+ iNdEx += 4
+ return iNdEx, nil
+ default:
+ return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
+ }
+ }
+ panic("unreachable")
+}
+
+var (
+ ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
+)
diff --git a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/generated.proto b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/generated.proto
new file mode 100644
index 0000000..d04a0af
--- /dev/null
+++ b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/generated.proto
@@ -0,0 +1,77 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+
+// This file was autogenerated by go-to-protobuf. Do not edit it manually!
+
+syntax = 'proto2';
+
+package k8s.io.kubernetes.pkg.apis.policy.v1alpha1;
+
+import "k8s.io/kubernetes/pkg/api/resource/generated.proto";
+import "k8s.io/kubernetes/pkg/api/unversioned/generated.proto";
+import "k8s.io/kubernetes/pkg/api/v1/generated.proto";
+import "k8s.io/kubernetes/pkg/runtime/generated.proto";
+import "k8s.io/kubernetes/pkg/util/intstr/generated.proto";
+
+// Package-wide variables from generator "generated".
+option go_package = "v1alpha1";
+
+// PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods
+message PodDisruptionBudget {
+ optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1;
+
+ // Specification of the desired behavior of the PodDisruptionBudget.
+ optional PodDisruptionBudgetSpec spec = 2;
+
+ // Most recently observed status of the PodDisruptionBudget.
+ optional PodDisruptionBudgetStatus status = 3;
+}
+
+// PodDisruptionBudgetList is a collection of PodDisruptionBudgets.
+message PodDisruptionBudgetList {
+ optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1;
+
+ repeated PodDisruptionBudget items = 2;
+}
+
+// PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.
+message PodDisruptionBudgetSpec {
+ // The minimum number of pods that must be available simultaneously. This
+ // can be either an integer or a string specifying a percentage, e.g. "28%".
+ optional k8s.io.kubernetes.pkg.util.intstr.IntOrString minAvailable = 1;
+
+ // Label query over pods whose evictions are managed by the disruption
+ // budget.
+ optional k8s.io.kubernetes.pkg.api.unversioned.LabelSelector selector = 2;
+}
+
+// PodDisruptionBudgetStatus represents information about the status of a
+// PodDisruptionBudget. Status may trail the actual state of a system.
+message PodDisruptionBudgetStatus {
+ // Whether or not a disruption is currently allowed.
+ optional bool disruptionAllowed = 1;
+
+ // current number of healthy pods
+ optional int32 currentHealthy = 2;
+
+ // minimum desired number of healthy pods
+ optional int32 desiredHealthy = 3;
+
+ // total number of pods counted by this disruption budget
+ optional int32 expectedPods = 4;
+}
+
diff --git a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/register.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/register.go
new file mode 100644
index 0000000..6a82e3f
--- /dev/null
+++ b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/register.go
@@ -0,0 +1,50 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+import (
+ "k8s.io/kubernetes/pkg/api/unversioned"
+ "k8s.io/kubernetes/pkg/api/v1"
+ "k8s.io/kubernetes/pkg/runtime"
+ versionedwatch "k8s.io/kubernetes/pkg/watch/versioned"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "policy"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: "v1alpha1"}
+
+func AddToScheme(scheme *runtime.Scheme) {
+ addKnownTypes(scheme)
+ /*
+ addDefaultingFuncs(scheme)
+ addConversionFuncs(scheme)
+ */
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &PodDisruptionBudget{},
+ &PodDisruptionBudgetList{},
+ &v1.ListOptions{},
+ &v1.DeleteOptions{},
+ )
+ // Add the watch version that applies
+ versionedwatch.AddToGroupVersion(scheme, SchemeGroupVersion)
+}
diff --git a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/types.generated.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/types.generated.go
new file mode 100644
index 0000000..6592c9c
--- /dev/null
+++ b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/types.generated.go
@@ -0,0 +1,1440 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// ************************************************************
+// DO NOT EDIT.
+// THIS FILE IS AUTO-GENERATED BY codecgen.
+// ************************************************************
+
+package v1alpha1
+
+import (
+ "errors"
+ "fmt"
+ codec1978 "github.com/ugorji/go/codec"
+ pkg2_unversioned "k8s.io/kubernetes/pkg/api/unversioned"
+ pkg3_v1 "k8s.io/kubernetes/pkg/api/v1"
+ pkg4_types "k8s.io/kubernetes/pkg/types"
+ pkg1_intstr "k8s.io/kubernetes/pkg/util/intstr"
+ "reflect"
+ "runtime"
+ time "time"
+)
+
+const (
+ // ----- content types ----
+ codecSelferC_UTF81234 = 1
+ codecSelferC_RAW1234 = 0
+ // ----- value types used ----
+ codecSelferValueTypeArray1234 = 10
+ codecSelferValueTypeMap1234 = 9
+ // ----- containerStateValues ----
+ codecSelfer_containerMapKey1234 = 2
+ codecSelfer_containerMapValue1234 = 3
+ codecSelfer_containerMapEnd1234 = 4
+ codecSelfer_containerArrayElem1234 = 6
+ codecSelfer_containerArrayEnd1234 = 7
+)
+
+var (
+ codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits())
+ codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`)
+)
+
+type codecSelfer1234 struct{}
+
+func init() {
+ if codec1978.GenVersion != 5 {
+ _, file, _, _ := runtime.Caller(0)
+ err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v",
+ 5, codec1978.GenVersion, file)
+ panic(err)
+ }
+ if false { // reference the types, but skip this branch at build/run time
+ var v0 pkg2_unversioned.LabelSelector
+ var v1 pkg3_v1.ObjectMeta
+ var v2 pkg4_types.UID
+ var v3 pkg1_intstr.IntOrString
+ var v4 time.Time
+ _, _, _, _, _ = v0, v1, v2, v3, v4
+ }
+}
+
+func (x *PodDisruptionBudgetSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ if x == nil {
+ r.EncodeNil()
+ } else {
+ yym1 := z.EncBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x) {
+ } else {
+ yysep2 := !z.EncBinary()
+ yy2arr2 := z.EncBasicHandle().StructToArray
+ var yyq2 [2]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = true
+ yyq2[1] = x.Selector != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(2)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ 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)
+ } else {
+ z.EncFallback(yy4)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ 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)
+ } else {
+ z.EncFallback(yy6)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Selector == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.Selector) {
+ } else {
+ z.EncFallback(x.Selector)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("selector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Selector == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.Selector) {
+ } else {
+ z.EncFallback(x.Selector)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodDisruptionBudgetSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ yym1 := z.DecBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x) {
+ } else {
+ yyct2 := r.ContainerType()
+ if yyct2 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodDisruptionBudgetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yys3Slc = z.DecScratchBuffer() // default slice to decode into
+ _ = yys3Slc
+ var yyhl3 bool = l >= 0
+ for yyj3 := 0; ; yyj3++ {
+ if yyhl3 {
+ if yyj3 >= l {
+ break
+ }
+ } else {
+ if r.CheckBreak() {
+ break
+ }
+ }
+ z.DecSendContainerState(codecSelfer_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "minAvailable":
+ if r.TryDecodeAsNil() {
+ x.MinAvailable = pkg1_intstr.IntOrString{}
+ } else {
+ yyv4 := &x.MinAvailable
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else if !yym5 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv4)
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "selector":
+ if r.TryDecodeAsNil() {
+ if x.Selector != nil {
+ x.Selector = nil
+ }
+ } else {
+ if x.Selector == nil {
+ x.Selector = new(pkg2_unversioned.LabelSelector)
+ }
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.Selector) {
+ } else {
+ z.DecFallback(x.Selector, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodDisruptionBudgetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ 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
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.MinAvailable = pkg1_intstr.IntOrString{}
+ } else {
+ yyv9 := &x.MinAvailable
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv9) {
+ } else if !yym10 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv9)
+ } else {
+ z.DecFallback(yyv9, false)
+ }
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Selector != nil {
+ x.Selector = nil
+ }
+ } else {
+ if x.Selector == nil {
+ x.Selector = new(pkg2_unversioned.LabelSelector)
+ }
+ yym12 := z.DecBinary()
+ _ = yym12
+ 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()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PodDisruptionBudgetStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ if x == nil {
+ r.EncodeNil()
+ } else {
+ yym1 := z.EncBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x) {
+ } else {
+ yysep2 := !z.EncBinary()
+ yy2arr2 := z.EncBasicHandle().StructToArray
+ var yyq2 [4]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 4
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeBool(bool(x.PodDisruptionAllowed))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("disruptionAllowed"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeBool(bool(x.PodDisruptionAllowed))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeInt(int64(x.CurrentHealthy))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("currentHealthy"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeInt(int64(x.CurrentHealthy))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeInt(int64(x.DesiredHealthy))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("desiredHealthy"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeInt(int64(x.DesiredHealthy))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ExpectedPods))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("expectedPods"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ExpectedPods))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodDisruptionBudgetStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ yym1 := z.DecBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x) {
+ } else {
+ yyct2 := r.ContainerType()
+ if yyct2 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodDisruptionBudgetStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yys3Slc = z.DecScratchBuffer() // default slice to decode into
+ _ = yys3Slc
+ var yyhl3 bool = l >= 0
+ for yyj3 := 0; ; yyj3++ {
+ if yyhl3 {
+ if yyj3 >= l {
+ break
+ }
+ } else {
+ if r.CheckBreak() {
+ break
+ }
+ }
+ z.DecSendContainerState(codecSelfer_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "disruptionAllowed":
+ if r.TryDecodeAsNil() {
+ x.PodDisruptionAllowed = false
+ } else {
+ x.PodDisruptionAllowed = bool(r.DecodeBool())
+ }
+ case "currentHealthy":
+ if r.TryDecodeAsNil() {
+ x.CurrentHealthy = 0
+ } else {
+ x.CurrentHealthy = int32(r.DecodeInt(32))
+ }
+ case "desiredHealthy":
+ if r.TryDecodeAsNil() {
+ x.DesiredHealthy = 0
+ } else {
+ x.DesiredHealthy = int32(r.DecodeInt(32))
+ }
+ case "expectedPods":
+ if r.TryDecodeAsNil() {
+ x.ExpectedPods = 0
+ } else {
+ x.ExpectedPods = int32(r.DecodeInt(32))
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodDisruptionBudgetStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ 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
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.PodDisruptionAllowed = false
+ } else {
+ x.PodDisruptionAllowed = bool(r.DecodeBool())
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.CurrentHealthy = 0
+ } else {
+ x.CurrentHealthy = int32(r.DecodeInt(32))
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.DesiredHealthy = 0
+ } else {
+ x.DesiredHealthy = int32(r.DecodeInt(32))
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ExpectedPods = 0
+ } else {
+ x.ExpectedPods = int32(r.DecodeInt(32))
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PodDisruptionBudget) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ if x == nil {
+ r.EncodeNil()
+ } else {
+ yym1 := z.EncBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x) {
+ } else {
+ yysep2 := !z.EncBinary()
+ yy2arr2 := z.EncBasicHandle().StructToArray
+ var yyq2 [5]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = true
+ yyq2[1] = true
+ yyq2[2] = true
+ yyq2[3] = x.Kind != ""
+ yyq2[4] = x.APIVersion != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yy4 := &x.ObjectMeta
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ObjectMeta
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yy9 := &x.Spec
+ yy9.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy11 := &x.Spec
+ yy11.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yy14 := &x.Status
+ yy14.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy16 := &x.Status
+ yy16.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodDisruptionBudget) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ yym1 := z.DecBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x) {
+ } else {
+ yyct2 := r.ContainerType()
+ if yyct2 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodDisruptionBudget) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yys3Slc = z.DecScratchBuffer() // default slice to decode into
+ _ = yys3Slc
+ var yyhl3 bool = l >= 0
+ for yyj3 := 0; ; yyj3++ {
+ if yyhl3 {
+ if yyj3 >= l {
+ break
+ }
+ } else {
+ if r.CheckBreak() {
+ break
+ }
+ }
+ z.DecSendContainerState(codecSelfer_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg3_v1.ObjectMeta{}
+ } else {
+ yyv4 := &x.ObjectMeta
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "spec":
+ if r.TryDecodeAsNil() {
+ x.Spec = PodDisruptionBudgetSpec{}
+ } else {
+ yyv5 := &x.Spec
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = PodDisruptionBudgetStatus{}
+ } else {
+ yyv6 := &x.Status
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodDisruptionBudget) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj9 int
+ var yyb9 bool
+ var yyhl9 bool = l >= 0
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg3_v1.ObjectMeta{}
+ } else {
+ yyv10 := &x.ObjectMeta
+ yyv10.CodecDecodeSelf(d)
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = PodDisruptionBudgetSpec{}
+ } else {
+ yyv11 := &x.Spec
+ yyv11.CodecDecodeSelf(d)
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = PodDisruptionBudgetStatus{}
+ } else {
+ yyv12 := &x.Status
+ yyv12.CodecDecodeSelf(d)
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ for {
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj9-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PodDisruptionBudgetList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ if x == nil {
+ r.EncodeNil()
+ } else {
+ yym1 := z.EncBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x) {
+ } else {
+ yysep2 := !z.EncBinary()
+ yy2arr2 := z.EncBasicHandle().StructToArray
+ var yyq2 [4]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = true
+ yyq2[2] = x.Kind != ""
+ yyq2[3] = x.APIVersion != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yy4 := &x.ListMeta
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy4) {
+ } else {
+ z.EncFallback(yy4)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ListMeta
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy6) {
+ } else {
+ z.EncFallback(yy6)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else {
+ h.encSlicePodDisruptionBudget(([]PodDisruptionBudget)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSlicePodDisruptionBudget(([]PodDisruptionBudget)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodDisruptionBudgetList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ yym1 := z.DecBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x) {
+ } else {
+ yyct2 := r.ContainerType()
+ if yyct2 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodDisruptionBudgetList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yys3Slc = z.DecScratchBuffer() // default slice to decode into
+ _ = yys3Slc
+ var yyhl3 bool = l >= 0
+ for yyj3 := 0; ; yyj3++ {
+ if yyhl3 {
+ if yyj3 >= l {
+ break
+ }
+ } else {
+ if r.CheckBreak() {
+ break
+ }
+ }
+ z.DecSendContainerState(codecSelfer_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "metadata":
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv4 := &x.ListMeta
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSlicePodDisruptionBudget((*[]PodDisruptionBudget)(yyv6), d)
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodDisruptionBudgetList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj10 int
+ var yyb10 bool
+ var yyhl10 bool = l >= 0
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_unversioned.ListMeta{}
+ } else {
+ yyv11 := &x.ListMeta
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else {
+ z.DecFallback(yyv11, false)
+ }
+ }
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSlicePodDisruptionBudget((*[]PodDisruptionBudget)(yyv13), d)
+ }
+ }
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ x.Kind = string(r.DecodeString())
+ }
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ x.APIVersion = string(r.DecodeString())
+ }
+ for {
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) encSlicePodDisruptionBudget(v []PodDisruptionBudget, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSlicePodDisruptionBudget(v *[]PodDisruptionBudget, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+
+ yyv1 := *v
+ yyh1, yyl1 := z.DecSliceHelperStart()
+ var yyc1 bool
+ _ = yyc1
+ if yyl1 == 0 {
+ if yyv1 == nil {
+ yyv1 = []PodDisruptionBudget{}
+ yyc1 = true
+ } else if len(yyv1) != 0 {
+ yyv1 = yyv1[:0]
+ yyc1 = true
+ }
+ } else if yyl1 > 0 {
+ var yyrr1, yyrl1 int
+ var yyrt1 bool
+ _, _ = yyrl1, yyrt1
+ yyrr1 = yyl1 // len(yyv1)
+ if yyl1 > cap(yyv1) {
+
+ yyrg1 := len(yyv1) > 0
+ yyv21 := yyv1
+ yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 296)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]PodDisruptionBudget, yyrl1)
+ }
+ } else {
+ yyv1 = make([]PodDisruptionBudget, yyrl1)
+ }
+ yyc1 = true
+ yyrr1 = len(yyv1)
+ if yyrg1 {
+ copy(yyv1, yyv21)
+ }
+ } else if yyl1 != len(yyv1) {
+ yyv1 = yyv1[:yyl1]
+ yyc1 = true
+ }
+ yyj1 := 0
+ for ; yyj1 < yyrr1; yyj1++ {
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = PodDisruptionBudget{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, PodDisruptionBudget{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = PodDisruptionBudget{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, PodDisruptionBudget{}) // var yyz1 PodDisruptionBudget
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = PodDisruptionBudget{}
+ } else {
+ yyv4 := &yyv1[yyj1]
+ yyv4.CodecDecodeSelf(d)
+ }
+
+ } else {
+ z.DecSwallow()
+ }
+
+ }
+ if yyj1 < len(yyv1) {
+ yyv1 = yyv1[:yyj1]
+ yyc1 = true
+ } else if yyj1 == 0 && yyv1 == nil {
+ yyv1 = []PodDisruptionBudget{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
diff --git a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/types.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/types.go
new file mode 100644
index 0000000..efe136f
--- /dev/null
+++ b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/types.go
@@ -0,0 +1,72 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+import (
+ "k8s.io/kubernetes/pkg/api/unversioned"
+
+ "k8s.io/kubernetes/pkg/api/v1"
+ "k8s.io/kubernetes/pkg/util/intstr"
+)
+
+// PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.
+type PodDisruptionBudgetSpec struct {
+ // The minimum number of pods that must be available simultaneously. This
+ // can be either an integer or a string specifying a percentage, e.g. "28%".
+ MinAvailable intstr.IntOrString `json:"minAvailable,omitempty" protobuf:"bytes,1,opt,name=minAvailable"`
+
+ // Label query over pods whose evictions are managed by the disruption
+ // budget.
+ Selector *unversioned.LabelSelector `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"`
+}
+
+// PodDisruptionBudgetStatus represents information about the status of a
+// PodDisruptionBudget. Status may trail the actual state of a system.
+type PodDisruptionBudgetStatus struct {
+ // Whether or not a disruption is currently allowed.
+ PodDisruptionAllowed bool `json:"disruptionAllowed" protobuf:"varint,1,opt,name=disruptionAllowed"`
+
+ // current number of healthy pods
+ CurrentHealthy int32 `json:"currentHealthy" protobuf:"varint,2,opt,name=currentHealthy"`
+
+ // minimum desired number of healthy pods
+ DesiredHealthy int32 `json:"desiredHealthy" protobuf:"varint,3,opt,name=desiredHealthy"`
+
+ // total number of pods counted by this disruption budget
+ ExpectedPods int32 `json:"expectedPods" protobuf:"varint,4,opt,name=expectedPods"`
+}
+
+// +genclient=true
+// +noMethods=true
+
+// PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods
+type PodDisruptionBudget struct {
+ unversioned.TypeMeta `json:",inline"`
+ v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Specification of the desired behavior of the PodDisruptionBudget.
+ Spec PodDisruptionBudgetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+ // Most recently observed status of the PodDisruptionBudget.
+ Status PodDisruptionBudgetStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// PodDisruptionBudgetList is a collection of PodDisruptionBudgets.
+type PodDisruptionBudgetList struct {
+ unversioned.TypeMeta `json:",inline"`
+ unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+ Items []PodDisruptionBudget `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
diff --git a/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/types_swagger_doc_generated.go b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/types_swagger_doc_generated.go
new file mode 100644
index 0000000..b12ce0f
--- /dev/null
+++ b/kube2msb/src/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/types_swagger_doc_generated.go
@@ -0,0 +1,70 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+// This file contains a collection of methods that can be used from go-restful to
+// generate Swagger API documentation for its models. Please read this PR for more
+// information on the implementation: https://github.com/emicklei/go-restful/pull/215
+//
+// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
+// they are on one line! For multiple line or blocks that you want to ignore use ---.
+// Any context after a --- is ignored.
+//
+// Those methods can be generated by using hack/update-generated-swagger-docs.sh
+
+// AUTO-GENERATED FUNCTIONS START HERE
+var map_PodDisruptionBudget = map[string]string{
+ "": "PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods",
+ "spec": "Specification of the desired behavior of the PodDisruptionBudget.",
+ "status": "Most recently observed status of the PodDisruptionBudget.",
+}
+
+func (PodDisruptionBudget) SwaggerDoc() map[string]string {
+ return map_PodDisruptionBudget
+}
+
+var map_PodDisruptionBudgetList = map[string]string{
+ "": "PodDisruptionBudgetList is a collection of PodDisruptionBudgets.",
+}
+
+func (PodDisruptionBudgetList) SwaggerDoc() map[string]string {
+ return map_PodDisruptionBudgetList
+}
+
+var map_PodDisruptionBudgetSpec = map[string]string{
+ "": "PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.",
+ "minAvailable": "The minimum number of pods that must be available simultaneously. This can be either an integer or a string specifying a percentage, e.g. \"28%\".",
+ "selector": "Label query over pods whose evictions are managed by the disruption budget.",
+}
+
+func (PodDisruptionBudgetSpec) SwaggerDoc() map[string]string {
+ return map_PodDisruptionBudgetSpec
+}
+
+var map_PodDisruptionBudgetStatus = map[string]string{
+ "": "PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system.",
+ "disruptionAllowed": "Whether or not a disruption is currently allowed.",
+ "currentHealthy": "current number of healthy pods",
+ "desiredHealthy": "minimum desired number of healthy pods",
+ "expectedPods": "total number of pods counted by this disruption budget",
+}
+
+func (PodDisruptionBudgetStatus) SwaggerDoc() map[string]string {
+ return map_PodDisruptionBudgetStatus
+}
+
+// AUTO-GENERATED FUNCTIONS END HERE