Merge pull request #26308 from quinton-hoole/2016-05-25-uberentes-add-cluster-zone

Add zones and region to federation cluster API object status.
pull/6/head
Alex Robinson 2016-05-27 13:23:46 -07:00
commit f6b4707619
9 changed files with 458 additions and 92 deletions

View File

@ -163,6 +163,14 @@ func DeepCopy_federation_ClusterStatus(in ClusterStatus, out *ClusterStatus, c *
if err := DeepCopy_federation_ClusterMeta(in.ClusterMeta, &out.ClusterMeta, c); err != nil {
return err
}
if in.Zones != nil {
in, out := in.Zones, &out.Zones
*out = make([]string, len(in))
copy(*out, in)
} else {
out.Zones = nil
}
out.Region = in.Region
return nil
}

View File

@ -1161,16 +1161,18 @@ func (x *ClusterStatus) CodecEncodeSelf(e *codec1978.Encoder) {
} else {
yysep2 := !z.EncBinary()
yy2arr2 := z.EncBasicHandle().StructToArray
var yyq2 [4]bool
var yyq2 [6]bool
_, _, _ = yysep2, yyq2, yy2arr2
const yyr2 bool = false
yyq2[0] = len(x.Conditions) != 0
yyq2[1] = len(x.Capacity) != 0
yyq2[2] = len(x.Allocatable) != 0
yyq2[3] = x.Version != ""
yyq2[3] = len(x.Zones) != 0
yyq2[4] = x.Region != ""
yyq2[5] = x.Version != ""
var yynn2 int
if yyr2 || yy2arr2 {
r.EncodeArrayStart(4)
r.EncodeArrayStart(6)
} else {
yynn2 = 0
for _, b := range yyq2 {
@ -1267,8 +1269,66 @@ func (x *ClusterStatus) CodecEncodeSelf(e *codec1978.Encoder) {
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[3] {
yym13 := z.EncBinary()
_ = yym13
if x.Zones == nil {
r.EncodeNil()
} else {
yym13 := z.EncBinary()
_ = yym13
if false {
} else {
z.F.EncSliceStringV(x.Zones, false, e)
}
}
} else {
r.EncodeNil()
}
} else {
if yyq2[3] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("zones"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if x.Zones == nil {
r.EncodeNil()
} else {
yym14 := z.EncBinary()
_ = yym14
if false {
} else {
z.F.EncSliceStringV(x.Zones, false, e)
}
}
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[4] {
yym16 := z.EncBinary()
_ = yym16
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Region))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq2[4] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("region"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym17 := z.EncBinary()
_ = yym17
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Region))
}
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[5] {
yym19 := z.EncBinary()
_ = yym19
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Version))
@ -1277,12 +1337,12 @@ func (x *ClusterStatus) CodecEncodeSelf(e *codec1978.Encoder) {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq2[3] {
if yyq2[5] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("version"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym14 := z.EncBinary()
_ = yym14
yym20 := z.EncBinary()
_ = yym20
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Version))
@ -1376,6 +1436,24 @@ func (x *ClusterStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
yyv7 := &x.Allocatable
yyv7.CodecDecodeSelf(d)
}
case "zones":
if r.TryDecodeAsNil() {
x.Zones = nil
} else {
yyv8 := &x.Zones
yym9 := z.DecBinary()
_ = yym9
if false {
} else {
z.F.DecSliceStringX(yyv8, false, d)
}
}
case "region":
if r.TryDecodeAsNil() {
x.Region = ""
} else {
x.Region = string(r.DecodeString())
}
case "version":
if r.TryDecodeAsNil() {
x.Version = ""
@ -1393,16 +1471,16 @@ func (x *ClusterStatus) 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
var yyj12 int
var yyb12 bool
var yyhl12 bool = l >= 0
yyj12++
if yyhl12 {
yyb12 = yyj12 > l
} else {
yyb9 = r.CheckBreak()
yyb12 = r.CheckBreak()
}
if yyb9 {
if yyb12 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
@ -1410,21 +1488,21 @@ func (x *ClusterStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
if r.TryDecodeAsNil() {
x.Conditions = nil
} else {
yyv10 := &x.Conditions
yym11 := z.DecBinary()
_ = yym11
yyv13 := &x.Conditions
yym14 := z.DecBinary()
_ = yym14
if false {
} else {
h.decSliceClusterCondition((*[]ClusterCondition)(yyv10), d)
h.decSliceClusterCondition((*[]ClusterCondition)(yyv13), d)
}
}
yyj9++
if yyhl9 {
yyb9 = yyj9 > l
yyj12++
if yyhl12 {
yyb12 = yyj12 > l
} else {
yyb9 = r.CheckBreak()
yyb12 = r.CheckBreak()
}
if yyb9 {
if yyb12 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
@ -1432,16 +1510,16 @@ func (x *ClusterStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
if r.TryDecodeAsNil() {
x.Capacity = nil
} else {
yyv12 := &x.Capacity
yyv12.CodecDecodeSelf(d)
yyv15 := &x.Capacity
yyv15.CodecDecodeSelf(d)
}
yyj9++
if yyhl9 {
yyb9 = yyj9 > l
yyj12++
if yyhl12 {
yyb12 = yyj12 > l
} else {
yyb9 = r.CheckBreak()
yyb12 = r.CheckBreak()
}
if yyb9 {
if yyb12 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
@ -1449,16 +1527,54 @@ func (x *ClusterStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
if r.TryDecodeAsNil() {
x.Allocatable = nil
} else {
yyv13 := &x.Allocatable
yyv13.CodecDecodeSelf(d)
yyv16 := &x.Allocatable
yyv16.CodecDecodeSelf(d)
}
yyj9++
if yyhl9 {
yyb9 = yyj9 > l
yyj12++
if yyhl12 {
yyb12 = yyj12 > l
} else {
yyb9 = r.CheckBreak()
yyb12 = r.CheckBreak()
}
if yyb9 {
if yyb12 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Zones = nil
} else {
yyv17 := &x.Zones
yym18 := z.DecBinary()
_ = yym18
if false {
} else {
z.F.DecSliceStringX(yyv17, false, d)
}
}
yyj12++
if yyhl12 {
yyb12 = yyj12 > l
} else {
yyb12 = r.CheckBreak()
}
if yyb12 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Region = ""
} else {
x.Region = string(r.DecodeString())
}
yyj12++
if yyhl12 {
yyb12 = yyj12 > l
} else {
yyb12 = r.CheckBreak()
}
if yyb12 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
@ -1469,17 +1585,17 @@ func (x *ClusterStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
x.Version = string(r.DecodeString())
}
for {
yyj9++
if yyhl9 {
yyb9 = yyj9 > l
yyj12++
if yyhl12 {
yyb12 = yyj12 > l
} else {
yyb9 = r.CheckBreak()
yyb12 = r.CheckBreak()
}
if yyb9 {
if yyb12 {
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj9-1, "")
z.DecStructFieldNotFound(yyj12-1, "")
}
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}
@ -2448,7 +2564,7 @@ func (x codecSelfer1234) decSliceCluster(v *[]Cluster, d *codec1978.Decoder) {
yyrg1 := len(yyv1) > 0
yyv21 := yyv1
yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 328)
yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 368)
if yyrt1 {
if yyrl1 <= cap(yyv1) {
yyv1 = yyv1[:yyrl1]

View File

@ -85,6 +85,11 @@ type ClusterStatus struct {
// Allocatable represents the total resources of a cluster that are available for scheduling.
Allocatable api.ResourceList `json:"allocatable,omitempty"`
ClusterMeta `json:",inline"`
// Zones is the list of avaliability zones in which the nodes of the cluster exist, e.g. 'us-east1-a'.
// These will always be in the same region.
Zones []string `json:"zones,omitempty"`
// Region is the name of the region in which all of the nodes in the cluster exist. e.g. 'us-east1'.
Region string `json:"region,omitempty"`
}
// +genclient=true,nonNamespaced=true

View File

@ -275,6 +275,14 @@ func autoConvert_v1alpha1_ClusterStatus_To_federation_ClusterStatus(in *ClusterS
if err := Convert_v1alpha1_ClusterMeta_To_federation_ClusterMeta(&in.ClusterMeta, &out.ClusterMeta, s); err != nil {
return err
}
if in.Zones != nil {
in, out := &in.Zones, &out.Zones
*out = make([]string, len(*in))
copy(*out, *in)
} else {
out.Zones = nil
}
out.Region = in.Region
return nil
}
@ -323,6 +331,14 @@ func autoConvert_federation_ClusterStatus_To_v1alpha1_ClusterStatus(in *federati
if err := Convert_federation_ClusterMeta_To_v1alpha1_ClusterMeta(&in.ClusterMeta, &out.ClusterMeta, s); err != nil {
return err
}
if in.Zones != nil {
in, out := &in.Zones, &out.Zones
*out = make([]string, len(*in))
copy(*out, *in)
} else {
out.Zones = nil
}
out.Region = in.Region
return nil
}

View File

@ -164,6 +164,14 @@ func DeepCopy_v1alpha1_ClusterStatus(in ClusterStatus, out *ClusterStatus, c *co
if err := DeepCopy_v1alpha1_ClusterMeta(in.ClusterMeta, &out.ClusterMeta, c); err != nil {
return err
}
if in.Zones != nil {
in, out := in.Zones, &out.Zones
*out = make([]string, len(in))
copy(*out, in)
} else {
out.Zones = nil
}
out.Region = in.Region
return nil
}

View File

@ -358,6 +358,25 @@ func (m *ClusterStatus) MarshalTo(data []byte) (int, error) {
return 0, err
}
i += n10
if len(m.Zones) > 0 {
for _, s := range m.Zones {
data[i] = 0x2a
i++
l = len(s)
for l >= 1<<7 {
data[i] = uint8(uint64(l)&0x7f | 0x80)
l >>= 7
i++
}
data[i] = uint8(l)
i++
i += copy(data[i:], s)
}
}
data[i] = 0x32
i++
i = encodeVarintGenerated(data, i, uint64(len(m.Region)))
i += copy(data[i:], m.Region)
return i, nil
}
@ -511,6 +530,14 @@ func (m *ClusterStatus) Size() (n int) {
}
l = m.ClusterMeta.Size()
n += 1 + l + sovGenerated(uint64(l))
if len(m.Zones) > 0 {
for _, s := range m.Zones {
l = len(s)
n += 1 + l + sovGenerated(uint64(l))
}
}
l = len(m.Region)
n += 1 + l + sovGenerated(uint64(l))
return n
}
@ -1529,6 +1556,64 @@ func (m *ClusterStatus) Unmarshal(data []byte) error {
return err
}
iNdEx = postIndex
case 5:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Zones", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := data[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Zones = append(m.Zones, string(data[iNdEx:postIndex]))
iNdEx = postIndex
case 6:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Region", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := data[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Region = string(data[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGenerated(data[iNdEx:])

View File

@ -106,6 +106,13 @@ message ClusterStatus {
map<string, k8s.io.kubernetes.pkg.api.resource.Quantity> allocatable = 3;
optional ClusterMeta clusterMeta = 4;
// Zones is the list of avaliability zones in which the nodes of the cluster exist, e.g. 'us-east1-a'.
// These will always be in the same region.
repeated string zones = 5;
// Region is the name of the region in which all of the nodes in the cluster exist. e.g. 'us-east1'.
optional string region = 6;
}
// ServerAddressByClientCIDR helps the client to determine the server address that they should use, depending on the clientCIDR that they match.

View File

@ -1161,16 +1161,18 @@ func (x *ClusterStatus) CodecEncodeSelf(e *codec1978.Encoder) {
} else {
yysep2 := !z.EncBinary()
yy2arr2 := z.EncBasicHandle().StructToArray
var yyq2 [4]bool
var yyq2 [6]bool
_, _, _ = yysep2, yyq2, yy2arr2
const yyr2 bool = false
yyq2[0] = len(x.Conditions) != 0
yyq2[1] = len(x.Capacity) != 0
yyq2[2] = len(x.Allocatable) != 0
yyq2[3] = x.Version != ""
yyq2[3] = len(x.Zones) != 0
yyq2[4] = x.Region != ""
yyq2[5] = x.Version != ""
var yynn2 int
if yyr2 || yy2arr2 {
r.EncodeArrayStart(4)
r.EncodeArrayStart(6)
} else {
yynn2 = 0
for _, b := range yyq2 {
@ -1267,8 +1269,66 @@ func (x *ClusterStatus) CodecEncodeSelf(e *codec1978.Encoder) {
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[3] {
yym13 := z.EncBinary()
_ = yym13
if x.Zones == nil {
r.EncodeNil()
} else {
yym13 := z.EncBinary()
_ = yym13
if false {
} else {
z.F.EncSliceStringV(x.Zones, false, e)
}
}
} else {
r.EncodeNil()
}
} else {
if yyq2[3] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("zones"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if x.Zones == nil {
r.EncodeNil()
} else {
yym14 := z.EncBinary()
_ = yym14
if false {
} else {
z.F.EncSliceStringV(x.Zones, false, e)
}
}
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[4] {
yym16 := z.EncBinary()
_ = yym16
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Region))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq2[4] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("region"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym17 := z.EncBinary()
_ = yym17
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Region))
}
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[5] {
yym19 := z.EncBinary()
_ = yym19
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Version))
@ -1277,12 +1337,12 @@ func (x *ClusterStatus) CodecEncodeSelf(e *codec1978.Encoder) {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq2[3] {
if yyq2[5] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("version"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym14 := z.EncBinary()
_ = yym14
yym20 := z.EncBinary()
_ = yym20
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Version))
@ -1376,6 +1436,24 @@ func (x *ClusterStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
yyv7 := &x.Allocatable
yyv7.CodecDecodeSelf(d)
}
case "zones":
if r.TryDecodeAsNil() {
x.Zones = nil
} else {
yyv8 := &x.Zones
yym9 := z.DecBinary()
_ = yym9
if false {
} else {
z.F.DecSliceStringX(yyv8, false, d)
}
}
case "region":
if r.TryDecodeAsNil() {
x.Region = ""
} else {
x.Region = string(r.DecodeString())
}
case "version":
if r.TryDecodeAsNil() {
x.Version = ""
@ -1393,16 +1471,16 @@ func (x *ClusterStatus) 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
var yyj12 int
var yyb12 bool
var yyhl12 bool = l >= 0
yyj12++
if yyhl12 {
yyb12 = yyj12 > l
} else {
yyb9 = r.CheckBreak()
yyb12 = r.CheckBreak()
}
if yyb9 {
if yyb12 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
@ -1410,21 +1488,21 @@ func (x *ClusterStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
if r.TryDecodeAsNil() {
x.Conditions = nil
} else {
yyv10 := &x.Conditions
yym11 := z.DecBinary()
_ = yym11
yyv13 := &x.Conditions
yym14 := z.DecBinary()
_ = yym14
if false {
} else {
h.decSliceClusterCondition((*[]ClusterCondition)(yyv10), d)
h.decSliceClusterCondition((*[]ClusterCondition)(yyv13), d)
}
}
yyj9++
if yyhl9 {
yyb9 = yyj9 > l
yyj12++
if yyhl12 {
yyb12 = yyj12 > l
} else {
yyb9 = r.CheckBreak()
yyb12 = r.CheckBreak()
}
if yyb9 {
if yyb12 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
@ -1432,16 +1510,16 @@ func (x *ClusterStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
if r.TryDecodeAsNil() {
x.Capacity = nil
} else {
yyv12 := &x.Capacity
yyv12.CodecDecodeSelf(d)
yyv15 := &x.Capacity
yyv15.CodecDecodeSelf(d)
}
yyj9++
if yyhl9 {
yyb9 = yyj9 > l
yyj12++
if yyhl12 {
yyb12 = yyj12 > l
} else {
yyb9 = r.CheckBreak()
yyb12 = r.CheckBreak()
}
if yyb9 {
if yyb12 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
@ -1449,16 +1527,54 @@ func (x *ClusterStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
if r.TryDecodeAsNil() {
x.Allocatable = nil
} else {
yyv13 := &x.Allocatable
yyv13.CodecDecodeSelf(d)
yyv16 := &x.Allocatable
yyv16.CodecDecodeSelf(d)
}
yyj9++
if yyhl9 {
yyb9 = yyj9 > l
yyj12++
if yyhl12 {
yyb12 = yyj12 > l
} else {
yyb9 = r.CheckBreak()
yyb12 = r.CheckBreak()
}
if yyb9 {
if yyb12 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Zones = nil
} else {
yyv17 := &x.Zones
yym18 := z.DecBinary()
_ = yym18
if false {
} else {
z.F.DecSliceStringX(yyv17, false, d)
}
}
yyj12++
if yyhl12 {
yyb12 = yyj12 > l
} else {
yyb12 = r.CheckBreak()
}
if yyb12 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Region = ""
} else {
x.Region = string(r.DecodeString())
}
yyj12++
if yyhl12 {
yyb12 = yyj12 > l
} else {
yyb12 = r.CheckBreak()
}
if yyb12 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
@ -1469,17 +1585,17 @@ func (x *ClusterStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
x.Version = string(r.DecodeString())
}
for {
yyj9++
if yyhl9 {
yyb9 = yyj9 > l
yyj12++
if yyhl12 {
yyb12 = yyj12 > l
} else {
yyb9 = r.CheckBreak()
yyb12 = r.CheckBreak()
}
if yyb9 {
if yyb12 {
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj9-1, "")
z.DecStructFieldNotFound(yyj12-1, "")
}
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}
@ -2448,7 +2564,7 @@ func (x codecSelfer1234) decSliceCluster(v *[]Cluster, d *codec1978.Decoder) {
yyrg1 := len(yyv1) > 0
yyv21 := yyv1
yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 328)
yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 368)
if yyrt1 {
if yyrl1 <= cap(yyv1) {
yyv1 = yyv1[:yyrl1]

View File

@ -85,6 +85,11 @@ type ClusterStatus struct {
// Allocatable represents the total resources of a cluster that are available for scheduling.
Allocatable v1.ResourceList `json:"allocatable,omitempty" protobuf:"bytes,3,rep,name=allocatable,casttype=k8s.io/kubernetes/pkg/api/v1.ResourceList,castkey=k8s.io/kubernetes/pkg/api/v1.ResourceName"`
ClusterMeta `json:",inline" protobuf:"bytes,4,opt,name=clusterMeta"`
// Zones is the list of avaliability zones in which the nodes of the cluster exist, e.g. 'us-east1-a'.
// These will always be in the same region.
Zones []string `json:"zones,omitempty" protobuf:"bytes,5,rep,name=zones"`
// Region is the name of the region in which all of the nodes in the cluster exist. e.g. 'us-east1'.
Region string `json:"region,omitempty" protobuf:"bytes,6,opt,name=region"`
}
// +genclient=true,nonNamespaced=true