mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-14 13:45:06 +00:00
Merge pull request #19669 from mikedanese/scheduler-config
Auto commit by PR queue bot
This commit is contained in:
@@ -54,7 +54,7 @@ kube-scheduler
|
|||||||
### Options
|
### Options
|
||||||
|
|
||||||
```
|
```
|
||||||
--address=0.0.0.0: The IP address to serve on (set to 0.0.0.0 for all interfaces)
|
--address="0.0.0.0": The IP address to serve on (set to 0.0.0.0 for all interfaces)
|
||||||
--algorithm-provider="DefaultProvider": The scheduling algorithm provider to use, one of: DefaultProvider
|
--algorithm-provider="DefaultProvider": The scheduling algorithm provider to use, one of: DefaultProvider
|
||||||
--google-json-key="": The Google Cloud Platform Service Account JSON Key to use for authentication.
|
--google-json-key="": The Google Cloud Platform Service Account JSON Key to use for authentication.
|
||||||
--kube-api-burst=100: Burst to use while talking with kubernetes apiserver
|
--kube-api-burst=100: Burst to use while talking with kubernetes apiserver
|
||||||
@@ -72,7 +72,7 @@ kube-scheduler
|
|||||||
--scheduler-name="default-scheduler": Name of the scheduler, used to select which pods will be processed by this scheduler, based on pod's annotation with key 'scheduler.alpha.kubernetes.io/name'
|
--scheduler-name="default-scheduler": Name of the scheduler, used to select which pods will be processed by this scheduler, based on pod's annotation with key 'scheduler.alpha.kubernetes.io/name'
|
||||||
```
|
```
|
||||||
|
|
||||||
###### Auto generated by spf13/cobra on 18-Jan-2016
|
###### Auto generated by spf13/cobra on 28-Jan-2016
|
||||||
|
|
||||||
|
|
||||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||||
|
@@ -4313,7 +4313,7 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco
|
|||||||
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
|
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *LeaderElectionConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
|
func (x *KubeSchedulerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
|
||||||
var h codecSelfer1234
|
var h codecSelfer1234
|
||||||
z, r := codec1978.GenHelperEncoder(e)
|
z, r := codec1978.GenHelperEncoder(e)
|
||||||
_, _, _ = h, z, r
|
_, _, _ = h, z, r
|
||||||
@@ -4327,14 +4327,14 @@ func (x *LeaderElectionConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
|
|||||||
} else {
|
} else {
|
||||||
yysep500 := !z.EncBinary()
|
yysep500 := !z.EncBinary()
|
||||||
yy2arr500 := z.EncBasicHandle().StructToArray
|
yy2arr500 := z.EncBasicHandle().StructToArray
|
||||||
var yyq500 [4]bool
|
var yyq500 [9]bool
|
||||||
_, _, _ = yysep500, yyq500, yy2arr500
|
_, _, _ = yysep500, yyq500, yy2arr500
|
||||||
const yyr500 bool = false
|
const yyr500 bool = false
|
||||||
var yynn500 int
|
var yynn500 int
|
||||||
if yyr500 || yy2arr500 {
|
if yyr500 || yy2arr500 {
|
||||||
r.EncodeArrayStart(4)
|
r.EncodeArrayStart(9)
|
||||||
} else {
|
} else {
|
||||||
yynn500 = 4
|
yynn500 = 9
|
||||||
for _, b := range yyq500 {
|
for _, b := range yyq500 {
|
||||||
if b {
|
if b {
|
||||||
yynn500++
|
yynn500++
|
||||||
@@ -4348,6 +4348,490 @@ func (x *LeaderElectionConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
|
|||||||
yym502 := z.EncBinary()
|
yym502 := z.EncBinary()
|
||||||
_ = yym502
|
_ = yym502
|
||||||
if false {
|
if false {
|
||||||
|
} else {
|
||||||
|
r.EncodeInt(int64(x.Port))
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
z.EncSendContainerState(codecSelfer_containerMapKey1234)
|
||||||
|
r.EncodeString(codecSelferC_UTF81234, string("port"))
|
||||||
|
z.EncSendContainerState(codecSelfer_containerMapValue1234)
|
||||||
|
yym503 := z.EncBinary()
|
||||||
|
_ = yym503
|
||||||
|
if false {
|
||||||
|
} else {
|
||||||
|
r.EncodeInt(int64(x.Port))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if yyr500 || yy2arr500 {
|
||||||
|
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
|
||||||
|
yym505 := z.EncBinary()
|
||||||
|
_ = yym505
|
||||||
|
if false {
|
||||||
|
} else {
|
||||||
|
r.EncodeString(codecSelferC_UTF81234, string(x.Address))
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
z.EncSendContainerState(codecSelfer_containerMapKey1234)
|
||||||
|
r.EncodeString(codecSelferC_UTF81234, string("address"))
|
||||||
|
z.EncSendContainerState(codecSelfer_containerMapValue1234)
|
||||||
|
yym506 := z.EncBinary()
|
||||||
|
_ = yym506
|
||||||
|
if false {
|
||||||
|
} else {
|
||||||
|
r.EncodeString(codecSelferC_UTF81234, string(x.Address))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if yyr500 || yy2arr500 {
|
||||||
|
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
|
||||||
|
yym508 := z.EncBinary()
|
||||||
|
_ = yym508
|
||||||
|
if false {
|
||||||
|
} else {
|
||||||
|
r.EncodeString(codecSelferC_UTF81234, string(x.AlgorithmProvider))
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
z.EncSendContainerState(codecSelfer_containerMapKey1234)
|
||||||
|
r.EncodeString(codecSelferC_UTF81234, string("algorithmProvider"))
|
||||||
|
z.EncSendContainerState(codecSelfer_containerMapValue1234)
|
||||||
|
yym509 := z.EncBinary()
|
||||||
|
_ = yym509
|
||||||
|
if false {
|
||||||
|
} else {
|
||||||
|
r.EncodeString(codecSelferC_UTF81234, string(x.AlgorithmProvider))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if yyr500 || yy2arr500 {
|
||||||
|
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
|
||||||
|
yym511 := z.EncBinary()
|
||||||
|
_ = yym511
|
||||||
|
if false {
|
||||||
|
} else {
|
||||||
|
r.EncodeString(codecSelferC_UTF81234, string(x.PolicyConfigFile))
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
z.EncSendContainerState(codecSelfer_containerMapKey1234)
|
||||||
|
r.EncodeString(codecSelferC_UTF81234, string("policyConfigFile"))
|
||||||
|
z.EncSendContainerState(codecSelfer_containerMapValue1234)
|
||||||
|
yym512 := z.EncBinary()
|
||||||
|
_ = yym512
|
||||||
|
if false {
|
||||||
|
} else {
|
||||||
|
r.EncodeString(codecSelferC_UTF81234, string(x.PolicyConfigFile))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if yyr500 || yy2arr500 {
|
||||||
|
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
|
||||||
|
yym514 := z.EncBinary()
|
||||||
|
_ = yym514
|
||||||
|
if false {
|
||||||
|
} else {
|
||||||
|
r.EncodeBool(bool(x.EnableProfiling))
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
z.EncSendContainerState(codecSelfer_containerMapKey1234)
|
||||||
|
r.EncodeString(codecSelferC_UTF81234, string("enableProfiling"))
|
||||||
|
z.EncSendContainerState(codecSelfer_containerMapValue1234)
|
||||||
|
yym515 := z.EncBinary()
|
||||||
|
_ = yym515
|
||||||
|
if false {
|
||||||
|
} else {
|
||||||
|
r.EncodeBool(bool(x.EnableProfiling))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if yyr500 || yy2arr500 {
|
||||||
|
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
|
||||||
|
yym517 := z.EncBinary()
|
||||||
|
_ = yym517
|
||||||
|
if false {
|
||||||
|
} else {
|
||||||
|
r.EncodeFloat32(float32(x.KubeAPIQPS))
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
z.EncSendContainerState(codecSelfer_containerMapKey1234)
|
||||||
|
r.EncodeString(codecSelferC_UTF81234, string("kubeAPIQPS"))
|
||||||
|
z.EncSendContainerState(codecSelfer_containerMapValue1234)
|
||||||
|
yym518 := z.EncBinary()
|
||||||
|
_ = yym518
|
||||||
|
if false {
|
||||||
|
} else {
|
||||||
|
r.EncodeFloat32(float32(x.KubeAPIQPS))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if yyr500 || yy2arr500 {
|
||||||
|
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
|
||||||
|
yym520 := z.EncBinary()
|
||||||
|
_ = yym520
|
||||||
|
if false {
|
||||||
|
} else {
|
||||||
|
r.EncodeInt(int64(x.KubeAPIBurst))
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
z.EncSendContainerState(codecSelfer_containerMapKey1234)
|
||||||
|
r.EncodeString(codecSelferC_UTF81234, string("kubeAPIBurst"))
|
||||||
|
z.EncSendContainerState(codecSelfer_containerMapValue1234)
|
||||||
|
yym521 := z.EncBinary()
|
||||||
|
_ = yym521
|
||||||
|
if false {
|
||||||
|
} else {
|
||||||
|
r.EncodeInt(int64(x.KubeAPIBurst))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if yyr500 || yy2arr500 {
|
||||||
|
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
|
||||||
|
yym523 := z.EncBinary()
|
||||||
|
_ = yym523
|
||||||
|
if false {
|
||||||
|
} else {
|
||||||
|
r.EncodeString(codecSelferC_UTF81234, string(x.SchedulerName))
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
z.EncSendContainerState(codecSelfer_containerMapKey1234)
|
||||||
|
r.EncodeString(codecSelferC_UTF81234, string("schedulerName"))
|
||||||
|
z.EncSendContainerState(codecSelfer_containerMapValue1234)
|
||||||
|
yym524 := z.EncBinary()
|
||||||
|
_ = yym524
|
||||||
|
if false {
|
||||||
|
} else {
|
||||||
|
r.EncodeString(codecSelferC_UTF81234, string(x.SchedulerName))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if yyr500 || yy2arr500 {
|
||||||
|
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
|
||||||
|
yy526 := &x.LeaderElection
|
||||||
|
yy526.CodecEncodeSelf(e)
|
||||||
|
} else {
|
||||||
|
z.EncSendContainerState(codecSelfer_containerMapKey1234)
|
||||||
|
r.EncodeString(codecSelferC_UTF81234, string("leaderElection"))
|
||||||
|
z.EncSendContainerState(codecSelfer_containerMapValue1234)
|
||||||
|
yy527 := &x.LeaderElection
|
||||||
|
yy527.CodecEncodeSelf(e)
|
||||||
|
}
|
||||||
|
if yyr500 || yy2arr500 {
|
||||||
|
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
|
||||||
|
} else {
|
||||||
|
z.EncSendContainerState(codecSelfer_containerMapEnd1234)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *KubeSchedulerConfiguration) CodecDecodeSelf(d *codec1978.Decoder) {
|
||||||
|
var h codecSelfer1234
|
||||||
|
z, r := codec1978.GenHelperDecoder(d)
|
||||||
|
_, _, _ = h, z, r
|
||||||
|
yym528 := z.DecBinary()
|
||||||
|
_ = yym528
|
||||||
|
if false {
|
||||||
|
} else if z.HasExtensions() && z.DecExt(x) {
|
||||||
|
} else {
|
||||||
|
yyct529 := r.ContainerType()
|
||||||
|
if yyct529 == codecSelferValueTypeMap1234 {
|
||||||
|
yyl529 := r.ReadMapStart()
|
||||||
|
if yyl529 == 0 {
|
||||||
|
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
|
||||||
|
} else {
|
||||||
|
x.codecDecodeSelfFromMap(yyl529, d)
|
||||||
|
}
|
||||||
|
} else if yyct529 == codecSelferValueTypeArray1234 {
|
||||||
|
yyl529 := r.ReadArrayStart()
|
||||||
|
if yyl529 == 0 {
|
||||||
|
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
|
||||||
|
} else {
|
||||||
|
x.codecDecodeSelfFromArray(yyl529, d)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *KubeSchedulerConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
|
||||||
|
var h codecSelfer1234
|
||||||
|
z, r := codec1978.GenHelperDecoder(d)
|
||||||
|
_, _, _ = h, z, r
|
||||||
|
var yys530Slc = z.DecScratchBuffer() // default slice to decode into
|
||||||
|
_ = yys530Slc
|
||||||
|
var yyhl530 bool = l >= 0
|
||||||
|
for yyj530 := 0; ; yyj530++ {
|
||||||
|
if yyhl530 {
|
||||||
|
if yyj530 >= l {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if r.CheckBreak() {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
z.DecSendContainerState(codecSelfer_containerMapKey1234)
|
||||||
|
yys530Slc = r.DecodeBytes(yys530Slc, true, true)
|
||||||
|
yys530 := string(yys530Slc)
|
||||||
|
z.DecSendContainerState(codecSelfer_containerMapValue1234)
|
||||||
|
switch yys530 {
|
||||||
|
case "port":
|
||||||
|
if r.TryDecodeAsNil() {
|
||||||
|
x.Port = 0
|
||||||
|
} else {
|
||||||
|
x.Port = int(r.DecodeInt(codecSelferBitsize1234))
|
||||||
|
}
|
||||||
|
case "address":
|
||||||
|
if r.TryDecodeAsNil() {
|
||||||
|
x.Address = ""
|
||||||
|
} else {
|
||||||
|
x.Address = string(r.DecodeString())
|
||||||
|
}
|
||||||
|
case "algorithmProvider":
|
||||||
|
if r.TryDecodeAsNil() {
|
||||||
|
x.AlgorithmProvider = ""
|
||||||
|
} else {
|
||||||
|
x.AlgorithmProvider = string(r.DecodeString())
|
||||||
|
}
|
||||||
|
case "policyConfigFile":
|
||||||
|
if r.TryDecodeAsNil() {
|
||||||
|
x.PolicyConfigFile = ""
|
||||||
|
} else {
|
||||||
|
x.PolicyConfigFile = string(r.DecodeString())
|
||||||
|
}
|
||||||
|
case "enableProfiling":
|
||||||
|
if r.TryDecodeAsNil() {
|
||||||
|
x.EnableProfiling = false
|
||||||
|
} else {
|
||||||
|
x.EnableProfiling = bool(r.DecodeBool())
|
||||||
|
}
|
||||||
|
case "kubeAPIQPS":
|
||||||
|
if r.TryDecodeAsNil() {
|
||||||
|
x.KubeAPIQPS = 0
|
||||||
|
} else {
|
||||||
|
x.KubeAPIQPS = float32(r.DecodeFloat(true))
|
||||||
|
}
|
||||||
|
case "kubeAPIBurst":
|
||||||
|
if r.TryDecodeAsNil() {
|
||||||
|
x.KubeAPIBurst = 0
|
||||||
|
} else {
|
||||||
|
x.KubeAPIBurst = int(r.DecodeInt(codecSelferBitsize1234))
|
||||||
|
}
|
||||||
|
case "schedulerName":
|
||||||
|
if r.TryDecodeAsNil() {
|
||||||
|
x.SchedulerName = ""
|
||||||
|
} else {
|
||||||
|
x.SchedulerName = string(r.DecodeString())
|
||||||
|
}
|
||||||
|
case "leaderElection":
|
||||||
|
if r.TryDecodeAsNil() {
|
||||||
|
x.LeaderElection = LeaderElectionConfiguration{}
|
||||||
|
} else {
|
||||||
|
yyv539 := &x.LeaderElection
|
||||||
|
yyv539.CodecDecodeSelf(d)
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
z.DecStructFieldNotFound(-1, yys530)
|
||||||
|
} // end switch yys530
|
||||||
|
} // end for yyj530
|
||||||
|
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *KubeSchedulerConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
|
||||||
|
var h codecSelfer1234
|
||||||
|
z, r := codec1978.GenHelperDecoder(d)
|
||||||
|
_, _, _ = h, z, r
|
||||||
|
var yyj540 int
|
||||||
|
var yyb540 bool
|
||||||
|
var yyhl540 bool = l >= 0
|
||||||
|
yyj540++
|
||||||
|
if yyhl540 {
|
||||||
|
yyb540 = yyj540 > l
|
||||||
|
} else {
|
||||||
|
yyb540 = r.CheckBreak()
|
||||||
|
}
|
||||||
|
if yyb540 {
|
||||||
|
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
|
||||||
|
if r.TryDecodeAsNil() {
|
||||||
|
x.Port = 0
|
||||||
|
} else {
|
||||||
|
x.Port = int(r.DecodeInt(codecSelferBitsize1234))
|
||||||
|
}
|
||||||
|
yyj540++
|
||||||
|
if yyhl540 {
|
||||||
|
yyb540 = yyj540 > l
|
||||||
|
} else {
|
||||||
|
yyb540 = r.CheckBreak()
|
||||||
|
}
|
||||||
|
if yyb540 {
|
||||||
|
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
|
||||||
|
if r.TryDecodeAsNil() {
|
||||||
|
x.Address = ""
|
||||||
|
} else {
|
||||||
|
x.Address = string(r.DecodeString())
|
||||||
|
}
|
||||||
|
yyj540++
|
||||||
|
if yyhl540 {
|
||||||
|
yyb540 = yyj540 > l
|
||||||
|
} else {
|
||||||
|
yyb540 = r.CheckBreak()
|
||||||
|
}
|
||||||
|
if yyb540 {
|
||||||
|
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
|
||||||
|
if r.TryDecodeAsNil() {
|
||||||
|
x.AlgorithmProvider = ""
|
||||||
|
} else {
|
||||||
|
x.AlgorithmProvider = string(r.DecodeString())
|
||||||
|
}
|
||||||
|
yyj540++
|
||||||
|
if yyhl540 {
|
||||||
|
yyb540 = yyj540 > l
|
||||||
|
} else {
|
||||||
|
yyb540 = r.CheckBreak()
|
||||||
|
}
|
||||||
|
if yyb540 {
|
||||||
|
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
|
||||||
|
if r.TryDecodeAsNil() {
|
||||||
|
x.PolicyConfigFile = ""
|
||||||
|
} else {
|
||||||
|
x.PolicyConfigFile = string(r.DecodeString())
|
||||||
|
}
|
||||||
|
yyj540++
|
||||||
|
if yyhl540 {
|
||||||
|
yyb540 = yyj540 > l
|
||||||
|
} else {
|
||||||
|
yyb540 = r.CheckBreak()
|
||||||
|
}
|
||||||
|
if yyb540 {
|
||||||
|
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
|
||||||
|
if r.TryDecodeAsNil() {
|
||||||
|
x.EnableProfiling = false
|
||||||
|
} else {
|
||||||
|
x.EnableProfiling = bool(r.DecodeBool())
|
||||||
|
}
|
||||||
|
yyj540++
|
||||||
|
if yyhl540 {
|
||||||
|
yyb540 = yyj540 > l
|
||||||
|
} else {
|
||||||
|
yyb540 = r.CheckBreak()
|
||||||
|
}
|
||||||
|
if yyb540 {
|
||||||
|
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
|
||||||
|
if r.TryDecodeAsNil() {
|
||||||
|
x.KubeAPIQPS = 0
|
||||||
|
} else {
|
||||||
|
x.KubeAPIQPS = float32(r.DecodeFloat(true))
|
||||||
|
}
|
||||||
|
yyj540++
|
||||||
|
if yyhl540 {
|
||||||
|
yyb540 = yyj540 > l
|
||||||
|
} else {
|
||||||
|
yyb540 = r.CheckBreak()
|
||||||
|
}
|
||||||
|
if yyb540 {
|
||||||
|
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
|
||||||
|
if r.TryDecodeAsNil() {
|
||||||
|
x.KubeAPIBurst = 0
|
||||||
|
} else {
|
||||||
|
x.KubeAPIBurst = int(r.DecodeInt(codecSelferBitsize1234))
|
||||||
|
}
|
||||||
|
yyj540++
|
||||||
|
if yyhl540 {
|
||||||
|
yyb540 = yyj540 > l
|
||||||
|
} else {
|
||||||
|
yyb540 = r.CheckBreak()
|
||||||
|
}
|
||||||
|
if yyb540 {
|
||||||
|
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
|
||||||
|
if r.TryDecodeAsNil() {
|
||||||
|
x.SchedulerName = ""
|
||||||
|
} else {
|
||||||
|
x.SchedulerName = string(r.DecodeString())
|
||||||
|
}
|
||||||
|
yyj540++
|
||||||
|
if yyhl540 {
|
||||||
|
yyb540 = yyj540 > l
|
||||||
|
} else {
|
||||||
|
yyb540 = r.CheckBreak()
|
||||||
|
}
|
||||||
|
if yyb540 {
|
||||||
|
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
|
||||||
|
if r.TryDecodeAsNil() {
|
||||||
|
x.LeaderElection = LeaderElectionConfiguration{}
|
||||||
|
} else {
|
||||||
|
yyv549 := &x.LeaderElection
|
||||||
|
yyv549.CodecDecodeSelf(d)
|
||||||
|
}
|
||||||
|
for {
|
||||||
|
yyj540++
|
||||||
|
if yyhl540 {
|
||||||
|
yyb540 = yyj540 > l
|
||||||
|
} else {
|
||||||
|
yyb540 = r.CheckBreak()
|
||||||
|
}
|
||||||
|
if yyb540 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
|
||||||
|
z.DecStructFieldNotFound(yyj540-1, "")
|
||||||
|
}
|
||||||
|
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *LeaderElectionConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
|
||||||
|
var h codecSelfer1234
|
||||||
|
z, r := codec1978.GenHelperEncoder(e)
|
||||||
|
_, _, _ = h, z, r
|
||||||
|
if x == nil {
|
||||||
|
r.EncodeNil()
|
||||||
|
} else {
|
||||||
|
yym550 := z.EncBinary()
|
||||||
|
_ = yym550
|
||||||
|
if false {
|
||||||
|
} else if z.HasExtensions() && z.EncExt(x) {
|
||||||
|
} else {
|
||||||
|
yysep551 := !z.EncBinary()
|
||||||
|
yy2arr551 := z.EncBasicHandle().StructToArray
|
||||||
|
var yyq551 [4]bool
|
||||||
|
_, _, _ = yysep551, yyq551, yy2arr551
|
||||||
|
const yyr551 bool = false
|
||||||
|
var yynn551 int
|
||||||
|
if yyr551 || yy2arr551 {
|
||||||
|
r.EncodeArrayStart(4)
|
||||||
|
} else {
|
||||||
|
yynn551 = 4
|
||||||
|
for _, b := range yyq551 {
|
||||||
|
if b {
|
||||||
|
yynn551++
|
||||||
|
}
|
||||||
|
}
|
||||||
|
r.EncodeMapStart(yynn551)
|
||||||
|
yynn551 = 0
|
||||||
|
}
|
||||||
|
if yyr551 || yy2arr551 {
|
||||||
|
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
|
||||||
|
yym553 := z.EncBinary()
|
||||||
|
_ = yym553
|
||||||
|
if false {
|
||||||
} else {
|
} else {
|
||||||
r.EncodeBool(bool(x.LeaderElect))
|
r.EncodeBool(bool(x.LeaderElect))
|
||||||
}
|
}
|
||||||
@@ -4355,95 +4839,95 @@ func (x *LeaderElectionConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
|
|||||||
z.EncSendContainerState(codecSelfer_containerMapKey1234)
|
z.EncSendContainerState(codecSelfer_containerMapKey1234)
|
||||||
r.EncodeString(codecSelferC_UTF81234, string("leaderElect"))
|
r.EncodeString(codecSelferC_UTF81234, string("leaderElect"))
|
||||||
z.EncSendContainerState(codecSelfer_containerMapValue1234)
|
z.EncSendContainerState(codecSelfer_containerMapValue1234)
|
||||||
yym503 := z.EncBinary()
|
yym554 := z.EncBinary()
|
||||||
_ = yym503
|
_ = yym554
|
||||||
if false {
|
if false {
|
||||||
} else {
|
} else {
|
||||||
r.EncodeBool(bool(x.LeaderElect))
|
r.EncodeBool(bool(x.LeaderElect))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if yyr500 || yy2arr500 {
|
if yyr551 || yy2arr551 {
|
||||||
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
|
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
|
||||||
yy505 := &x.LeaseDuration
|
yy556 := &x.LeaseDuration
|
||||||
yym506 := z.EncBinary()
|
yym557 := z.EncBinary()
|
||||||
_ = yym506
|
_ = yym557
|
||||||
if false {
|
if false {
|
||||||
} else if z.HasExtensions() && z.EncExt(yy505) {
|
} else if z.HasExtensions() && z.EncExt(yy556) {
|
||||||
} else if !yym506 && z.IsJSONHandle() {
|
} else if !yym557 && z.IsJSONHandle() {
|
||||||
z.EncJSONMarshal(yy505)
|
z.EncJSONMarshal(yy556)
|
||||||
} else {
|
} else {
|
||||||
z.EncFallback(yy505)
|
z.EncFallback(yy556)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
z.EncSendContainerState(codecSelfer_containerMapKey1234)
|
z.EncSendContainerState(codecSelfer_containerMapKey1234)
|
||||||
r.EncodeString(codecSelferC_UTF81234, string("leaseDuration"))
|
r.EncodeString(codecSelferC_UTF81234, string("leaseDuration"))
|
||||||
z.EncSendContainerState(codecSelfer_containerMapValue1234)
|
z.EncSendContainerState(codecSelfer_containerMapValue1234)
|
||||||
yy507 := &x.LeaseDuration
|
yy558 := &x.LeaseDuration
|
||||||
yym508 := z.EncBinary()
|
yym559 := z.EncBinary()
|
||||||
_ = yym508
|
_ = yym559
|
||||||
if false {
|
if false {
|
||||||
} else if z.HasExtensions() && z.EncExt(yy507) {
|
} else if z.HasExtensions() && z.EncExt(yy558) {
|
||||||
} else if !yym508 && z.IsJSONHandle() {
|
} else if !yym559 && z.IsJSONHandle() {
|
||||||
z.EncJSONMarshal(yy507)
|
z.EncJSONMarshal(yy558)
|
||||||
} else {
|
} else {
|
||||||
z.EncFallback(yy507)
|
z.EncFallback(yy558)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if yyr500 || yy2arr500 {
|
if yyr551 || yy2arr551 {
|
||||||
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
|
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
|
||||||
yy510 := &x.RenewDeadline
|
yy561 := &x.RenewDeadline
|
||||||
yym511 := z.EncBinary()
|
yym562 := z.EncBinary()
|
||||||
_ = yym511
|
_ = yym562
|
||||||
if false {
|
if false {
|
||||||
} else if z.HasExtensions() && z.EncExt(yy510) {
|
} else if z.HasExtensions() && z.EncExt(yy561) {
|
||||||
} else if !yym511 && z.IsJSONHandle() {
|
} else if !yym562 && z.IsJSONHandle() {
|
||||||
z.EncJSONMarshal(yy510)
|
z.EncJSONMarshal(yy561)
|
||||||
} else {
|
} else {
|
||||||
z.EncFallback(yy510)
|
z.EncFallback(yy561)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
z.EncSendContainerState(codecSelfer_containerMapKey1234)
|
z.EncSendContainerState(codecSelfer_containerMapKey1234)
|
||||||
r.EncodeString(codecSelferC_UTF81234, string("renewDeadline"))
|
r.EncodeString(codecSelferC_UTF81234, string("renewDeadline"))
|
||||||
z.EncSendContainerState(codecSelfer_containerMapValue1234)
|
z.EncSendContainerState(codecSelfer_containerMapValue1234)
|
||||||
yy512 := &x.RenewDeadline
|
yy563 := &x.RenewDeadline
|
||||||
yym513 := z.EncBinary()
|
yym564 := z.EncBinary()
|
||||||
_ = yym513
|
_ = yym564
|
||||||
if false {
|
if false {
|
||||||
} else if z.HasExtensions() && z.EncExt(yy512) {
|
} else if z.HasExtensions() && z.EncExt(yy563) {
|
||||||
} else if !yym513 && z.IsJSONHandle() {
|
} else if !yym564 && z.IsJSONHandle() {
|
||||||
z.EncJSONMarshal(yy512)
|
z.EncJSONMarshal(yy563)
|
||||||
} else {
|
} else {
|
||||||
z.EncFallback(yy512)
|
z.EncFallback(yy563)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if yyr500 || yy2arr500 {
|
if yyr551 || yy2arr551 {
|
||||||
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
|
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
|
||||||
yy515 := &x.RetryPeriod
|
yy566 := &x.RetryPeriod
|
||||||
yym516 := z.EncBinary()
|
yym567 := z.EncBinary()
|
||||||
_ = yym516
|
_ = yym567
|
||||||
if false {
|
if false {
|
||||||
} else if z.HasExtensions() && z.EncExt(yy515) {
|
} else if z.HasExtensions() && z.EncExt(yy566) {
|
||||||
} else if !yym516 && z.IsJSONHandle() {
|
} else if !yym567 && z.IsJSONHandle() {
|
||||||
z.EncJSONMarshal(yy515)
|
z.EncJSONMarshal(yy566)
|
||||||
} else {
|
} else {
|
||||||
z.EncFallback(yy515)
|
z.EncFallback(yy566)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
z.EncSendContainerState(codecSelfer_containerMapKey1234)
|
z.EncSendContainerState(codecSelfer_containerMapKey1234)
|
||||||
r.EncodeString(codecSelferC_UTF81234, string("retryPeriod"))
|
r.EncodeString(codecSelferC_UTF81234, string("retryPeriod"))
|
||||||
z.EncSendContainerState(codecSelfer_containerMapValue1234)
|
z.EncSendContainerState(codecSelfer_containerMapValue1234)
|
||||||
yy517 := &x.RetryPeriod
|
yy568 := &x.RetryPeriod
|
||||||
yym518 := z.EncBinary()
|
yym569 := z.EncBinary()
|
||||||
_ = yym518
|
_ = yym569
|
||||||
if false {
|
if false {
|
||||||
} else if z.HasExtensions() && z.EncExt(yy517) {
|
} else if z.HasExtensions() && z.EncExt(yy568) {
|
||||||
} else if !yym518 && z.IsJSONHandle() {
|
} else if !yym569 && z.IsJSONHandle() {
|
||||||
z.EncJSONMarshal(yy517)
|
z.EncJSONMarshal(yy568)
|
||||||
} else {
|
} else {
|
||||||
z.EncFallback(yy517)
|
z.EncFallback(yy568)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if yyr500 || yy2arr500 {
|
if yyr551 || yy2arr551 {
|
||||||
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
|
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
|
||||||
} else {
|
} else {
|
||||||
z.EncSendContainerState(codecSelfer_containerMapEnd1234)
|
z.EncSendContainerState(codecSelfer_containerMapEnd1234)
|
||||||
@@ -4456,25 +4940,25 @@ func (x *LeaderElectionConfiguration) CodecDecodeSelf(d *codec1978.Decoder) {
|
|||||||
var h codecSelfer1234
|
var h codecSelfer1234
|
||||||
z, r := codec1978.GenHelperDecoder(d)
|
z, r := codec1978.GenHelperDecoder(d)
|
||||||
_, _, _ = h, z, r
|
_, _, _ = h, z, r
|
||||||
yym519 := z.DecBinary()
|
yym570 := z.DecBinary()
|
||||||
_ = yym519
|
_ = yym570
|
||||||
if false {
|
if false {
|
||||||
} else if z.HasExtensions() && z.DecExt(x) {
|
} else if z.HasExtensions() && z.DecExt(x) {
|
||||||
} else {
|
} else {
|
||||||
yyct520 := r.ContainerType()
|
yyct571 := r.ContainerType()
|
||||||
if yyct520 == codecSelferValueTypeMap1234 {
|
if yyct571 == codecSelferValueTypeMap1234 {
|
||||||
yyl520 := r.ReadMapStart()
|
yyl571 := r.ReadMapStart()
|
||||||
if yyl520 == 0 {
|
if yyl571 == 0 {
|
||||||
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
|
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
|
||||||
} else {
|
} else {
|
||||||
x.codecDecodeSelfFromMap(yyl520, d)
|
x.codecDecodeSelfFromMap(yyl571, d)
|
||||||
}
|
}
|
||||||
} else if yyct520 == codecSelferValueTypeArray1234 {
|
} else if yyct571 == codecSelferValueTypeArray1234 {
|
||||||
yyl520 := r.ReadArrayStart()
|
yyl571 := r.ReadArrayStart()
|
||||||
if yyl520 == 0 {
|
if yyl571 == 0 {
|
||||||
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
|
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
|
||||||
} else {
|
} else {
|
||||||
x.codecDecodeSelfFromArray(yyl520, d)
|
x.codecDecodeSelfFromArray(yyl571, d)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
|
panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
|
||||||
@@ -4486,12 +4970,12 @@ func (x *LeaderElectionConfiguration) codecDecodeSelfFromMap(l int, d *codec1978
|
|||||||
var h codecSelfer1234
|
var h codecSelfer1234
|
||||||
z, r := codec1978.GenHelperDecoder(d)
|
z, r := codec1978.GenHelperDecoder(d)
|
||||||
_, _, _ = h, z, r
|
_, _, _ = h, z, r
|
||||||
var yys521Slc = z.DecScratchBuffer() // default slice to decode into
|
var yys572Slc = z.DecScratchBuffer() // default slice to decode into
|
||||||
_ = yys521Slc
|
_ = yys572Slc
|
||||||
var yyhl521 bool = l >= 0
|
var yyhl572 bool = l >= 0
|
||||||
for yyj521 := 0; ; yyj521++ {
|
for yyj572 := 0; ; yyj572++ {
|
||||||
if yyhl521 {
|
if yyhl572 {
|
||||||
if yyj521 >= l {
|
if yyj572 >= l {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -4500,10 +4984,10 @@ func (x *LeaderElectionConfiguration) codecDecodeSelfFromMap(l int, d *codec1978
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
z.DecSendContainerState(codecSelfer_containerMapKey1234)
|
z.DecSendContainerState(codecSelfer_containerMapKey1234)
|
||||||
yys521Slc = r.DecodeBytes(yys521Slc, true, true)
|
yys572Slc = r.DecodeBytes(yys572Slc, true, true)
|
||||||
yys521 := string(yys521Slc)
|
yys572 := string(yys572Slc)
|
||||||
z.DecSendContainerState(codecSelfer_containerMapValue1234)
|
z.DecSendContainerState(codecSelfer_containerMapValue1234)
|
||||||
switch yys521 {
|
switch yys572 {
|
||||||
case "leaderElect":
|
case "leaderElect":
|
||||||
if r.TryDecodeAsNil() {
|
if r.TryDecodeAsNil() {
|
||||||
x.LeaderElect = false
|
x.LeaderElect = false
|
||||||
@@ -4514,51 +4998,51 @@ func (x *LeaderElectionConfiguration) codecDecodeSelfFromMap(l int, d *codec1978
|
|||||||
if r.TryDecodeAsNil() {
|
if r.TryDecodeAsNil() {
|
||||||
x.LeaseDuration = pkg1_unversioned.Duration{}
|
x.LeaseDuration = pkg1_unversioned.Duration{}
|
||||||
} else {
|
} else {
|
||||||
yyv523 := &x.LeaseDuration
|
yyv574 := &x.LeaseDuration
|
||||||
yym524 := z.DecBinary()
|
yym575 := z.DecBinary()
|
||||||
_ = yym524
|
_ = yym575
|
||||||
if false {
|
if false {
|
||||||
} else if z.HasExtensions() && z.DecExt(yyv523) {
|
} else if z.HasExtensions() && z.DecExt(yyv574) {
|
||||||
} else if !yym524 && z.IsJSONHandle() {
|
} else if !yym575 && z.IsJSONHandle() {
|
||||||
z.DecJSONUnmarshal(yyv523)
|
z.DecJSONUnmarshal(yyv574)
|
||||||
} else {
|
} else {
|
||||||
z.DecFallback(yyv523, false)
|
z.DecFallback(yyv574, false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case "renewDeadline":
|
case "renewDeadline":
|
||||||
if r.TryDecodeAsNil() {
|
if r.TryDecodeAsNil() {
|
||||||
x.RenewDeadline = pkg1_unversioned.Duration{}
|
x.RenewDeadline = pkg1_unversioned.Duration{}
|
||||||
} else {
|
} else {
|
||||||
yyv525 := &x.RenewDeadline
|
yyv576 := &x.RenewDeadline
|
||||||
yym526 := z.DecBinary()
|
yym577 := z.DecBinary()
|
||||||
_ = yym526
|
_ = yym577
|
||||||
if false {
|
if false {
|
||||||
} else if z.HasExtensions() && z.DecExt(yyv525) {
|
} else if z.HasExtensions() && z.DecExt(yyv576) {
|
||||||
} else if !yym526 && z.IsJSONHandle() {
|
} else if !yym577 && z.IsJSONHandle() {
|
||||||
z.DecJSONUnmarshal(yyv525)
|
z.DecJSONUnmarshal(yyv576)
|
||||||
} else {
|
} else {
|
||||||
z.DecFallback(yyv525, false)
|
z.DecFallback(yyv576, false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case "retryPeriod":
|
case "retryPeriod":
|
||||||
if r.TryDecodeAsNil() {
|
if r.TryDecodeAsNil() {
|
||||||
x.RetryPeriod = pkg1_unversioned.Duration{}
|
x.RetryPeriod = pkg1_unversioned.Duration{}
|
||||||
} else {
|
} else {
|
||||||
yyv527 := &x.RetryPeriod
|
yyv578 := &x.RetryPeriod
|
||||||
yym528 := z.DecBinary()
|
yym579 := z.DecBinary()
|
||||||
_ = yym528
|
_ = yym579
|
||||||
if false {
|
if false {
|
||||||
} else if z.HasExtensions() && z.DecExt(yyv527) {
|
} else if z.HasExtensions() && z.DecExt(yyv578) {
|
||||||
} else if !yym528 && z.IsJSONHandle() {
|
} else if !yym579 && z.IsJSONHandle() {
|
||||||
z.DecJSONUnmarshal(yyv527)
|
z.DecJSONUnmarshal(yyv578)
|
||||||
} else {
|
} else {
|
||||||
z.DecFallback(yyv527, false)
|
z.DecFallback(yyv578, false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
z.DecStructFieldNotFound(-1, yys521)
|
z.DecStructFieldNotFound(-1, yys572)
|
||||||
} // end switch yys521
|
} // end switch yys572
|
||||||
} // end for yyj521
|
} // end for yyj572
|
||||||
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
|
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4566,16 +5050,16 @@ func (x *LeaderElectionConfiguration) codecDecodeSelfFromArray(l int, d *codec19
|
|||||||
var h codecSelfer1234
|
var h codecSelfer1234
|
||||||
z, r := codec1978.GenHelperDecoder(d)
|
z, r := codec1978.GenHelperDecoder(d)
|
||||||
_, _, _ = h, z, r
|
_, _, _ = h, z, r
|
||||||
var yyj529 int
|
var yyj580 int
|
||||||
var yyb529 bool
|
var yyb580 bool
|
||||||
var yyhl529 bool = l >= 0
|
var yyhl580 bool = l >= 0
|
||||||
yyj529++
|
yyj580++
|
||||||
if yyhl529 {
|
if yyhl580 {
|
||||||
yyb529 = yyj529 > l
|
yyb580 = yyj580 > l
|
||||||
} else {
|
} else {
|
||||||
yyb529 = r.CheckBreak()
|
yyb580 = r.CheckBreak()
|
||||||
}
|
}
|
||||||
if yyb529 {
|
if yyb580 {
|
||||||
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
|
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -4585,13 +5069,13 @@ func (x *LeaderElectionConfiguration) codecDecodeSelfFromArray(l int, d *codec19
|
|||||||
} else {
|
} else {
|
||||||
x.LeaderElect = bool(r.DecodeBool())
|
x.LeaderElect = bool(r.DecodeBool())
|
||||||
}
|
}
|
||||||
yyj529++
|
yyj580++
|
||||||
if yyhl529 {
|
if yyhl580 {
|
||||||
yyb529 = yyj529 > l
|
yyb580 = yyj580 > l
|
||||||
} else {
|
} else {
|
||||||
yyb529 = r.CheckBreak()
|
yyb580 = r.CheckBreak()
|
||||||
}
|
}
|
||||||
if yyb529 {
|
if yyb580 {
|
||||||
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
|
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -4599,24 +5083,24 @@ func (x *LeaderElectionConfiguration) codecDecodeSelfFromArray(l int, d *codec19
|
|||||||
if r.TryDecodeAsNil() {
|
if r.TryDecodeAsNil() {
|
||||||
x.LeaseDuration = pkg1_unversioned.Duration{}
|
x.LeaseDuration = pkg1_unversioned.Duration{}
|
||||||
} else {
|
} else {
|
||||||
yyv531 := &x.LeaseDuration
|
yyv582 := &x.LeaseDuration
|
||||||
yym532 := z.DecBinary()
|
yym583 := z.DecBinary()
|
||||||
_ = yym532
|
_ = yym583
|
||||||
if false {
|
if false {
|
||||||
} else if z.HasExtensions() && z.DecExt(yyv531) {
|
} else if z.HasExtensions() && z.DecExt(yyv582) {
|
||||||
} else if !yym532 && z.IsJSONHandle() {
|
} else if !yym583 && z.IsJSONHandle() {
|
||||||
z.DecJSONUnmarshal(yyv531)
|
z.DecJSONUnmarshal(yyv582)
|
||||||
} else {
|
} else {
|
||||||
z.DecFallback(yyv531, false)
|
z.DecFallback(yyv582, false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
yyj529++
|
yyj580++
|
||||||
if yyhl529 {
|
if yyhl580 {
|
||||||
yyb529 = yyj529 > l
|
yyb580 = yyj580 > l
|
||||||
} else {
|
} else {
|
||||||
yyb529 = r.CheckBreak()
|
yyb580 = r.CheckBreak()
|
||||||
}
|
}
|
||||||
if yyb529 {
|
if yyb580 {
|
||||||
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
|
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -4624,24 +5108,24 @@ func (x *LeaderElectionConfiguration) codecDecodeSelfFromArray(l int, d *codec19
|
|||||||
if r.TryDecodeAsNil() {
|
if r.TryDecodeAsNil() {
|
||||||
x.RenewDeadline = pkg1_unversioned.Duration{}
|
x.RenewDeadline = pkg1_unversioned.Duration{}
|
||||||
} else {
|
} else {
|
||||||
yyv533 := &x.RenewDeadline
|
yyv584 := &x.RenewDeadline
|
||||||
yym534 := z.DecBinary()
|
yym585 := z.DecBinary()
|
||||||
_ = yym534
|
_ = yym585
|
||||||
if false {
|
if false {
|
||||||
} else if z.HasExtensions() && z.DecExt(yyv533) {
|
} else if z.HasExtensions() && z.DecExt(yyv584) {
|
||||||
} else if !yym534 && z.IsJSONHandle() {
|
} else if !yym585 && z.IsJSONHandle() {
|
||||||
z.DecJSONUnmarshal(yyv533)
|
z.DecJSONUnmarshal(yyv584)
|
||||||
} else {
|
} else {
|
||||||
z.DecFallback(yyv533, false)
|
z.DecFallback(yyv584, false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
yyj529++
|
yyj580++
|
||||||
if yyhl529 {
|
if yyhl580 {
|
||||||
yyb529 = yyj529 > l
|
yyb580 = yyj580 > l
|
||||||
} else {
|
} else {
|
||||||
yyb529 = r.CheckBreak()
|
yyb580 = r.CheckBreak()
|
||||||
}
|
}
|
||||||
if yyb529 {
|
if yyb580 {
|
||||||
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
|
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -4649,29 +5133,29 @@ func (x *LeaderElectionConfiguration) codecDecodeSelfFromArray(l int, d *codec19
|
|||||||
if r.TryDecodeAsNil() {
|
if r.TryDecodeAsNil() {
|
||||||
x.RetryPeriod = pkg1_unversioned.Duration{}
|
x.RetryPeriod = pkg1_unversioned.Duration{}
|
||||||
} else {
|
} else {
|
||||||
yyv535 := &x.RetryPeriod
|
yyv586 := &x.RetryPeriod
|
||||||
yym536 := z.DecBinary()
|
yym587 := z.DecBinary()
|
||||||
_ = yym536
|
_ = yym587
|
||||||
if false {
|
if false {
|
||||||
} else if z.HasExtensions() && z.DecExt(yyv535) {
|
} else if z.HasExtensions() && z.DecExt(yyv586) {
|
||||||
} else if !yym536 && z.IsJSONHandle() {
|
} else if !yym587 && z.IsJSONHandle() {
|
||||||
z.DecJSONUnmarshal(yyv535)
|
z.DecJSONUnmarshal(yyv586)
|
||||||
} else {
|
} else {
|
||||||
z.DecFallback(yyv535, false)
|
z.DecFallback(yyv586, false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for {
|
for {
|
||||||
yyj529++
|
yyj580++
|
||||||
if yyhl529 {
|
if yyhl580 {
|
||||||
yyb529 = yyj529 > l
|
yyb580 = yyj580 > l
|
||||||
} else {
|
} else {
|
||||||
yyb529 = r.CheckBreak()
|
yyb580 = r.CheckBreak()
|
||||||
}
|
}
|
||||||
if yyb529 {
|
if yyb580 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
|
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
|
||||||
z.DecStructFieldNotFound(yyj529-1, "")
|
z.DecStructFieldNotFound(yyj580-1, "")
|
||||||
}
|
}
|
||||||
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
|
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
|
||||||
}
|
}
|
||||||
|
@@ -290,6 +290,29 @@ type KubeletConfiguration struct {
|
|||||||
NonMasqueradeCIDR string `json:"nonMasqueradeCIDR"`
|
NonMasqueradeCIDR string `json:"nonMasqueradeCIDR"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type KubeSchedulerConfiguration struct {
|
||||||
|
// port is the port that the scheduler's http service runs on.
|
||||||
|
Port int `json:"port"`
|
||||||
|
// address is the IP address to serve on.
|
||||||
|
Address string `json:"address"`
|
||||||
|
// algorithmProvider is the scheduling algorithm provider to use.
|
||||||
|
AlgorithmProvider string `json:"algorithmProvider"`
|
||||||
|
// policyConfigFile is the filepath to the scheduler policy configuration.
|
||||||
|
PolicyConfigFile string `json:"policyConfigFile"`
|
||||||
|
// enableProfiling enables profiling via web interface.
|
||||||
|
EnableProfiling bool `json:"enableProfiling"`
|
||||||
|
// kubeAPIQPS is the QPS to use while talking with kubernetes apiserver.
|
||||||
|
KubeAPIQPS float32 `json:"kubeAPIQPS"`
|
||||||
|
// kubeAPIBurst is the QPS burst to use while talking with kubernetes apiserver.
|
||||||
|
KubeAPIBurst int `json:"kubeAPIBurst"`
|
||||||
|
// schedulerName is name of the scheduler, used to select which pods
|
||||||
|
// will be processed by this scheduler, based on pod's annotation with
|
||||||
|
// key 'scheduler.alpha.kubernetes.io/name'.
|
||||||
|
SchedulerName string `json:"schedulerName"`
|
||||||
|
// leaderElection defines the configuration of leader election client.
|
||||||
|
LeaderElection LeaderElectionConfiguration `json:"leaderElection"`
|
||||||
|
}
|
||||||
|
|
||||||
// LeaderElectionConfiguration defines the configuration of leader election
|
// LeaderElectionConfiguration defines the configuration of leader election
|
||||||
// clients for components that can run with leader election enabled.
|
// clients for components that can run with leader election enabled.
|
||||||
type LeaderElectionConfiguration struct {
|
type LeaderElectionConfiguration struct {
|
||||||
|
@@ -18,8 +18,6 @@ limitations under the License.
|
|||||||
package options
|
package options
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"net"
|
|
||||||
|
|
||||||
"k8s.io/kubernetes/pkg/api"
|
"k8s.io/kubernetes/pkg/api"
|
||||||
"k8s.io/kubernetes/pkg/apis/componentconfig"
|
"k8s.io/kubernetes/pkg/apis/componentconfig"
|
||||||
"k8s.io/kubernetes/pkg/client/leaderelection"
|
"k8s.io/kubernetes/pkg/client/leaderelection"
|
||||||
@@ -31,31 +29,27 @@ import (
|
|||||||
|
|
||||||
// SchedulerServer has all the context and params needed to run a Scheduler
|
// SchedulerServer has all the context and params needed to run a Scheduler
|
||||||
type SchedulerServer struct {
|
type SchedulerServer struct {
|
||||||
Port int
|
componentconfig.KubeSchedulerConfiguration
|
||||||
Address net.IP
|
// Master is the address of the Kubernetes API server (overrides any
|
||||||
AlgorithmProvider string
|
// value in kubeconfig).
|
||||||
PolicyConfigFile string
|
Master string
|
||||||
EnableProfiling bool
|
// Kubeconfig is Path to kubeconfig file with authorization and master
|
||||||
Master string
|
// location information.
|
||||||
Kubeconfig string
|
Kubeconfig string
|
||||||
BindPodsQPS float32
|
|
||||||
BindPodsBurst int
|
|
||||||
KubeAPIQPS float32
|
|
||||||
KubeAPIBurst int
|
|
||||||
SchedulerName string
|
|
||||||
LeaderElection componentconfig.LeaderElectionConfiguration
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewSchedulerServer creates a new SchedulerServer with default parameters
|
// NewSchedulerServer creates a new SchedulerServer with default parameters
|
||||||
func NewSchedulerServer() *SchedulerServer {
|
func NewSchedulerServer() *SchedulerServer {
|
||||||
s := SchedulerServer{
|
s := SchedulerServer{
|
||||||
Port: ports.SchedulerPort,
|
KubeSchedulerConfiguration: componentconfig.KubeSchedulerConfiguration{
|
||||||
Address: net.ParseIP("0.0.0.0"),
|
Port: ports.SchedulerPort,
|
||||||
AlgorithmProvider: factory.DefaultProvider,
|
Address: "0.0.0.0",
|
||||||
KubeAPIQPS: 50.0,
|
AlgorithmProvider: factory.DefaultProvider,
|
||||||
KubeAPIBurst: 100,
|
KubeAPIQPS: 50.0,
|
||||||
SchedulerName: api.DefaultSchedulerName,
|
KubeAPIBurst: 100,
|
||||||
LeaderElection: leaderelection.DefaultLeaderElectionConfiguration(),
|
SchedulerName: api.DefaultSchedulerName,
|
||||||
|
LeaderElection: leaderelection.DefaultLeaderElectionConfiguration(),
|
||||||
|
},
|
||||||
}
|
}
|
||||||
return &s
|
return &s
|
||||||
}
|
}
|
||||||
@@ -63,15 +57,17 @@ func NewSchedulerServer() *SchedulerServer {
|
|||||||
// AddFlags adds flags for a specific SchedulerServer to the specified FlagSet
|
// AddFlags adds flags for a specific SchedulerServer to the specified FlagSet
|
||||||
func (s *SchedulerServer) AddFlags(fs *pflag.FlagSet) {
|
func (s *SchedulerServer) AddFlags(fs *pflag.FlagSet) {
|
||||||
fs.IntVar(&s.Port, "port", s.Port, "The port that the scheduler's http service runs on")
|
fs.IntVar(&s.Port, "port", s.Port, "The port that the scheduler's http service runs on")
|
||||||
fs.IPVar(&s.Address, "address", s.Address, "The IP address to serve on (set to 0.0.0.0 for all interfaces)")
|
fs.StringVar(&s.Address, "address", s.Address, "The IP address to serve on (set to 0.0.0.0 for all interfaces)")
|
||||||
fs.StringVar(&s.AlgorithmProvider, "algorithm-provider", s.AlgorithmProvider, "The scheduling algorithm provider to use, one of: "+factory.ListAlgorithmProviders())
|
fs.StringVar(&s.AlgorithmProvider, "algorithm-provider", s.AlgorithmProvider, "The scheduling algorithm provider to use, one of: "+factory.ListAlgorithmProviders())
|
||||||
fs.StringVar(&s.PolicyConfigFile, "policy-config-file", s.PolicyConfigFile, "File with scheduler policy configuration")
|
fs.StringVar(&s.PolicyConfigFile, "policy-config-file", s.PolicyConfigFile, "File with scheduler policy configuration")
|
||||||
fs.BoolVar(&s.EnableProfiling, "profiling", true, "Enable profiling via web interface host:port/debug/pprof/")
|
fs.BoolVar(&s.EnableProfiling, "profiling", true, "Enable profiling via web interface host:port/debug/pprof/")
|
||||||
fs.StringVar(&s.Master, "master", s.Master, "The address of the Kubernetes API server (overrides any value in kubeconfig)")
|
fs.StringVar(&s.Master, "master", s.Master, "The address of the Kubernetes API server (overrides any value in kubeconfig)")
|
||||||
fs.StringVar(&s.Kubeconfig, "kubeconfig", s.Kubeconfig, "Path to kubeconfig file with authorization and master location information.")
|
fs.StringVar(&s.Kubeconfig, "kubeconfig", s.Kubeconfig, "Path to kubeconfig file with authorization and master location information.")
|
||||||
fs.Float32Var(&s.BindPodsQPS, "bind-pods-qps", s.BindPodsQPS, "Number of bindings per second scheduler is allowed to continuously make")
|
var unusedBindPodsQPS float32
|
||||||
|
fs.Float32Var(&unusedBindPodsQPS, "bind-pods-qps", 0, "unused, use --kube-api-qps")
|
||||||
fs.MarkDeprecated("bind-pods-qps", "flag is unused and will be removed. Use kube-api-qps instead.")
|
fs.MarkDeprecated("bind-pods-qps", "flag is unused and will be removed. Use kube-api-qps instead.")
|
||||||
fs.IntVar(&s.BindPodsBurst, "bind-pods-burst", s.BindPodsBurst, "Number of bindings per second scheduler is allowed to make during bursts")
|
var unusedBindPodsBurst int
|
||||||
|
fs.IntVar(&unusedBindPodsBurst, "bind-pods-burst", 0, "unused, use --kube-api-burst")
|
||||||
fs.MarkDeprecated("bind-pods-burst", "flag is unused and will be removed. Use kube-api-burst instead.")
|
fs.MarkDeprecated("bind-pods-burst", "flag is unused and will be removed. Use kube-api-burst instead.")
|
||||||
fs.Float32Var(&s.KubeAPIQPS, "kube-api-qps", s.KubeAPIQPS, "QPS to use while talking with kubernetes apiserver")
|
fs.Float32Var(&s.KubeAPIQPS, "kube-api-qps", s.KubeAPIQPS, "QPS to use while talking with kubernetes apiserver")
|
||||||
fs.IntVar(&s.KubeAPIBurst, "kube-api-burst", s.KubeAPIBurst, "Burst to use while talking with kubernetes apiserver")
|
fs.IntVar(&s.KubeAPIBurst, "kube-api-burst", s.KubeAPIBurst, "Burst to use while talking with kubernetes apiserver")
|
||||||
|
@@ -93,7 +93,7 @@ func Run(s *options.SchedulerServer) error {
|
|||||||
mux.Handle("/metrics", prometheus.Handler())
|
mux.Handle("/metrics", prometheus.Handler())
|
||||||
|
|
||||||
server := &http.Server{
|
server := &http.Server{
|
||||||
Addr: net.JoinHostPort(s.Address.String(), strconv.Itoa(s.Port)),
|
Addr: net.JoinHostPort(s.Address, strconv.Itoa(s.Port)),
|
||||||
Handler: mux,
|
Handler: mux,
|
||||||
}
|
}
|
||||||
glog.Fatal(server.ListenAndServe())
|
glog.Fatal(server.ListenAndServe())
|
||||||
|
Reference in New Issue
Block a user